From acbf282b23b4cbdebca562d67132573de3902f94 Mon Sep 17 00:00:00 2001
From: Fu Juntang <StrongTiger_001@163.com>
Date: 星期五, 17 九月 2021 10:45:43 +0800
Subject: [PATCH] Merge branch 'master' of http://os.smartai.com:9091/valib/c_bhomebus
---
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