From 5026f256928cc3d3d6768faa63249bd343a4dd74 Mon Sep 17 00:00:00 2001
From: liuxiaolong <liuxiaolong@aiotlink.com>
Date: 星期二, 07 九月 2021 16:14:25 +0800
Subject: [PATCH] 调整defer C.BHFree的执行顺序
---
src/shm/shm_mm.cpp | 21 ---------------------
1 files changed, 0 insertions(+), 21 deletions(-)
diff --git a/src/shm/shm_mm.cpp b/src/shm/shm_mm.cpp
index 6341086..1fcf604 100644
--- a/src/shm/shm_mm.cpp
+++ b/src/shm/shm_mm.cpp
@@ -23,21 +23,6 @@
}
-template <typename T>
- T* shm_mm_attach(int key) {
- 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;
-}
void shm_mm_free_by_key(int key) {
return mm_free_by_key(key);
@@ -52,9 +37,3 @@
return mm_alloc_key();
}
-
-
-// extern int mm_checkheap(int verbose);
-
-
-#endif
\ No newline at end of file
--
Gitblit v1.8.0