| | |
| | | } |
| | | |
| | | void list () { |
| | | LockFreeQueue<shm_packet_t> * mqueue; |
| | | hashtable_t *hashtable = mm_get_hashtable(); |
| | | printf("%10s \t %10s\n", "KEY", "LENGTH"); |
| | | hashtable_foreach(hashtable, [&](int key, void * value){ |
| | | printf("%d\n", key); |
| | | if(key >= 100 ) { |
| | | mqueue = (LockFreeQueue<shm_packet_t> *)hashtable_get(hashtable, key); |
| | | printf("%10d \t %10d\n", key, mqueue->size()); |
| | | } else { |
| | | printf("%10d \t %10s\n", key, ""); |
| | | } |
| | | |
| | | }); |
| | | } |
| | | |
| | |
| | | |
| | | else if (strcmp("start_reply", fun) == 0) { |
| | | opt = parse_args(argc, argv); |
| | | opt = parse_args(argc, argv); |
| | | if(opt.key == 0) { |
| | | usage(argv[0]); |
| | | exit(1); |
| | |
| | | |
| | | } |
| | | |
| | | printf("==========end========\n"); |
| | | // shm_mm_wrapper_destroy(); |
| | | shm_mm_wrapper_destroy(); |
| | | |
| | | } |