119 #ifndef ti_sysbios_heaps_HeapMem__include   120 #define ti_sysbios_heaps_HeapMem__include   136 #define ti_sysbios_heaps_HeapMem_long_names   137 #include "HeapMem_defs.h"   144 #define HeapMem_reqAlign sizeof(HeapMem_Header)   149 #define HeapMem_A_align       "Requested align is not a power of 2"   154 #define HeapMem_A_heapSize    "Requested heap size is too small"   168 #define HeapMem_A_invalidFree "Heap-block free operations must not leave the heap in an invalid state"   177 #define HeapMem_A_zeroBlock   "Cannot allocate size 0"   182 #define HeapMem_E_memory      "out of memory: handle = 0x%x, size=%u"   208 typedef struct HeapMem_Header {
   209     struct HeapMem_Header *next;
   321     size_t minBlockAlign;
   322 } HeapMem_Struct, *HeapMem_Handle;
   330 } HeapMem_Module_State;
   340 #define ti_sysbios_heaps_HeapMem_Handle_upCast(handle) ((IHeap_Handle)(handle))   390 extern void HeapMem_free(HeapMem_Handle heap, 
void * buf, 
size_t size);
   527 static inline HeapMem_Handle HeapMem_handle(HeapMem_Struct *str)
   529     return ((HeapMem_Handle)str);
   532 static inline HeapMem_Struct * HeapMem_struct(HeapMem_Handle h)
   534     return ((HeapMem_Struct *)h);
   537 #define HeapMem_module ((HeapMem_Module_State *) &(HeapMem_Module_state))   547 #undef ti_sysbios_heaps_HeapMem_long_names   548 #include "HeapMem_defs.h" size_t size
Size of buffer being managed by this heap instance. 
Definition: HeapMem.h:204
size_t minBlockAlign
Minimum alignment for each block allocated. 
Definition: HeapMem.h:243
HeapMem_Handle HeapMem_construct(HeapMem_Struct *obj, const HeapMem_Params *params)
Construct a HeapMem heap. 
void HeapMem_Params_init(HeapMem_Params *prms)
Initialize the HeapMem_Params structure with default values. 
bool HeapMem_isBlocking(HeapMem_Handle heap)
This function queries the gate to determine if the alloc/free can be blocking. 
size_t size
Size of buffer being managed by this heap instance. 
Definition: HeapMem.h:260
Static and run-time memory manager. 
void HeapMem_getExtendedStats(HeapMem_Handle heap, HeapMem_ExtendedStats *statBuf)
Retrieves the extended statistics for a HeapMem instance. 
Opaque queue element. 
Definition: Queue.h:204
void HeapMem_restore(HeapMem_Handle heap)
Restore heap to its original created state. 
void * buf
Buffer being managed by this heap instance. 
Definition: HeapMem.h:198
Stat structure for the HeapMem_getExtendedStats function. 
Definition: HeapMem.h:187
Error block. 
Definition: Error.h:152
HeapMem_Handle HeapMem_Object_next(HeapMem_Handle heap)
return handle of the next HeapMem on HeapMem list 
void HeapMem_delete(HeapMem_Handle *heap)
Delete a HeapMem heap. 
void HeapMem_init(void)
Initialize instance at runtime. 
Interface to heap functions. 
void HeapMem_destruct(HeapMem_Struct *obj)
Destruct a HeapMem heap. 
HeapMem_Handle HeapMem_create(const HeapMem_Params *params, Error_Block *eb)
Create a HeapMem heap. 
HeapMem_Struct HeapMem_Object
Definition: HeapMem.h:325
Memory heap statistics. 
Definition: Memory.h:94
HeapMem_Handle HeapMem_Object_first(void)
return handle of the first HeapMem on HeapMem list 
Definition: HeapMem.h:219
void HeapMem_getStats(HeapMem_Handle heap, Memory_Stats *statBuf)
HeapMem_getStats will lock the heap using the HeapMem Gate while it retrieves the HeapMem's statistic...
void * buf
Buffer being managed by this heap instance. 
Definition: HeapMem.h:254
void * HeapMem_alloc(HeapMem_Handle heap, size_t size, size_t align, Error_Block *eb)
The actual block returned may be larger than requested to satisfy alignment requirements, and its size will always be a multiple of the size of the HeapMem_Header data structure (usually 8 bytes) 
void HeapMem_free(HeapMem_Handle heap, void *buf, size_t size)
HeapMem_free() places the memory block specified by addr and size back into the free pool of the heap...