src/shm/shm_mm.h
@@ -30,16 +30,14 @@ template <typename T> T* shm_mm_attach(int key) { void *ptr; // T* tptr; hashtable_t *hashtable = mm_get_hashtable(); void *ptr; // T* tptr; hashtable_t *hashtable = mm_get_hashtable(); ptr = hashtable_get(hashtable, key); // printf("shm_mm_malloc_by_key malloc before %d, %p\n", key, ptr); if(ptr == NULL || ptr == (void *)1 ) { ptr = mm_malloc(sizeof(T)); hashtable_put(hashtable, key, ptr); new(ptr) T; // printf("shm_mm_malloc_by_key use new %d, %p\n", key, ptr); } return (T*)ptr; }