lexLeo
Loading...
Searching...
No Matches
data_structure_memory_allocator.h
1// src/foundation/data_structures/include/internal/data_structure_memory_allocator.h
2
3#ifndef DATA_STRUCTURE_MEMORY_ALLOCATOR_H
4#define DATA_STRUCTURE_MEMORY_ALLOCATOR_H
5
6#ifdef USE_MEMORY_ALLOCATOR
7 #include "memory_allocator.h"
8 #define DATA_STRUCTURE_MALLOC(size) get_current_malloc()(size)
9 #define DATA_STRUCTURE_FREE(ptr) get_current_free()(ptr)
10#else
11 #include <stdlib.h>
12 #define DATA_STRUCTURE_MALLOC(size) malloc(size)
13 #define DATA_STRUCTURE_FREE(ptr) free(ptr)
14#endif
15
16#endif // DATA_STRUCTURE_MEMORY_ALLOCATOR_H