11 #ifndef __ewf_allocator_c_heap__h__included__
12 #define __ewf_allocator_c_heap__h__included__
32 uint32_t allocated_count;
33 uint32_t released_count;
48 #ifdef EWF_PARAMETER_CHECKING
49 #define EWF_ALLOCATOR_C_HEAP_INITIALIZE_HEADER(allocator_ptr) \
51 (allocator_ptr)->struct_magic = EWF_ALLOCATOR_STRUCT_MAGIC; \
52 (allocator_ptr)->struct_size = EWF_ALLOCATOR_STRUCT_SIZE; \
53 (allocator_ptr)->struct_version = EWF_ALLOCATOR_VERSION; \
54 (allocator_ptr)->struct_type = EWF_ALLOCATOR_TYPE_C_HEAP; \
57 #define EWF_ALLOCATOR_C_HEAP_INITIALIZE_HEADER(allocator_ptr)
67 #define EWF_ALLOCATOR_C_HEAP_STATIC_DECLARE(allocator_ptr, allocator_name_symb, block_count_param, block_size_param) \
69 static ewf_allocator_c_heap ewf_allocator_c_heap__##allocator_name_symb = {0}; \
70 static ewf_allocator ewf_allocator__##allocator_name_symb = {0}; \
71 ewf_allocator_c_heap__##allocator_name_symb.block_count = block_count_param; \
72 ewf_allocator_c_heap__##allocator_name_symb.block_size = block_size_param; \
73 ewf_allocator__##allocator_name_symb.start = ewf_allocator_c_heap_start; \
74 ewf_allocator__##allocator_name_symb.stop = ewf_allocator_c_heap_stop; \
75 ewf_allocator__##allocator_name_symb.allocate = ewf_allocator_c_heap_allocate; \
76 ewf_allocator__##allocator_name_symb.release = ewf_allocator_c_heap_release; \
77 ewf_allocator__##allocator_name_symb.implementation_ptr = &(ewf_allocator_c_heap__##allocator_name_symb); \
78 allocator_ptr = &(ewf_allocator__##allocator_name_symb); \
79 EWF_ALLOCATOR_C_HEAP_INITIALIZE_HEADER(allocator_ptr); \
struct _ewf_allocator_c_heap ewf_allocator_c_heap
C heap allocator implementation type.
enum _ewf_result ewf_result
Success and error result codes specific to the EWF API.
C heap allocator implementation type.
Definition: ewf_allocator_c_heap.h:31
uint32_t block_size
Definition: ewf_allocator_c_heap.h:36
The allocator structure definition.
Definition: ewf_allocator.h:27