zhangmeng
2024-04-09 2561a007b8d8999a4750046d0cfb3b1ad5af50ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include "usg_common.h"
#include "usg_typedef.h"
#include "hashtable.h"
#include "shm_mm_wraper.h"
 
int main() {
    shm_mm_wrapper_init(512);
    hashtable_t hashtable;
 
    hashtable_init(&hashtable);
    for(int i = 0; i < 10; i++) {
        hashtable_put(&hashtable, i, (void *)(i));
    }
 
    hashtable_foreach(&hashtable, [&](int key, void * value){
        printf("%d, %p\n", key, value);
    });
    shm_mm_wrapper_destroy();
}