From af100db4697a85522893ebbffbf2de2741988265 Mon Sep 17 00:00:00 2001
From: wangzhengquan <wangzhengquan85@126.com>
Date: 星期一, 20 七月 2020 11:13:41 +0800
Subject: [PATCH] update
---
queue/include/shm_allocator.h | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/queue/include/shm_allocator.h b/queue/include/shm_allocator.h
index 700f786..6d9dcc6 100644
--- a/queue/include/shm_allocator.h
+++ b/queue/include/shm_allocator.h
@@ -65,11 +65,13 @@
class SHM_Allocator {
public:
- static void *malloc (size_t size) {
+ static void *allocate (size_t size) {
+ printf("shm_allocator malloc\n");
return mm_malloc(size);
}
- static void free (void *ptr) {
+ static void deallocate (void *ptr) {
+ printf("shm_allocator free\n");
return mm_free(ptr);
}
};
@@ -77,11 +79,13 @@
class DM_Allocator {
public:
- static void *malloc (size_t size) {
+ static void *allocate (size_t size) {
+ printf("dm_allocator malloc\n");
return malloc(size);
}
- static void free (void *ptr) {
+ static void deallocate (void *ptr) {
+ printf("dm_allocator free\n");
return free(ptr);
}
};
--
Gitblit v1.8.0