29 #ifndef LEGATO_VARIABLEHEAP_H 
   30 #define LEGATO_VARIABLEHEAP_H 
   34 #if LE_MEMORY_MANAGER_ENABLE == 1 
   36 #if LE_USE_DEBUG_ALLOCATOR == 1 
   37 #define LE_VHEAP_ALLOC(heap, size) leVariableHeap_Alloc(heap, size, __LINE__, __FUNCTION__, __FILE__) 
   38 #define LE_VHEAP_REALLOC(heap, ptr, size) leVariableHeap_Realloc(heap, ptr, size, __LINE__, __FUNCTION__, __FILE__) 
   40 #define LE_VHEAP_ALLOC(heap, size) leVariableHeap_Alloc(heap, size) 
   41 #define LE_VHEAP_REALLOC(heap, ptr, size) leVariableHeap_Realloc(ptr, size) 
   71 typedef struct leVariableHeap
 
   83     uint32_t allocBlockCount;
 
   84     uint32_t freeBlockCount;
 
  102 leResult leVariableHeap_Init(leVariableHeap* heap,
 
  117 void leVariableHeap_Destroy(leVariableHeap* heap);
 
  119 #if LE_USE_DEBUG_ALLOCATOR == 1 
  148 void* leVariableHeap_Alloc(leVariableHeap* heap,
 
  151                            const char* funcName,
 
  152                            const char* fileName);
 
  166 void* leVariableHeap_Alloc(leVariableHeap* heap,
 
  170 #if LE_USE_DEBUG_ALLOCATOR == 1 
  186 void* leVariableHeap_Realloc(leVariableHeap* heap,
 
  190                              const char* funcName,
 
  191                              const char* fileName);
 
  206 void* leVariableHeap_Realloc(leVariableHeap* heap,
 
  223 void leVariableHeap_Free(leVariableHeap* heap,
 
  240 leBool leVariableHeap_Contains(leVariableHeap* heap,
 
  258 leResult leVariableHeap_Validate(leVariableHeap* heap);
 
  273 uint32_t leVariableHeap_SizeOf(leVariableHeap* heap,
 
  290 void leVariableHeap_Dump(leVariableHeap* heap,
 
  293 #endif // LE_MEMORY_MANAGER_ENABLE