| | |
| | | |
| | | 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); |
| | | } |
| | | }; |
| | |
| | | |
| | | 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); |
| | | } |
| | | }; |