Heap management definitions. More...

Go to the source code of this file.
Data Structures | |
| struct | _HEAPNODE | 
| Heap memory node information structure.  More... | |
Defines | |
| #define | NutHeapAdd(a, s) NutHeapRootAdd(&heapFreeList, a, s) | 
| #define | NutHeapAvailable() NutHeapRootAvailable(&heapFreeList) | 
| #define | NutHeapRegionAvailable() NutHeapRootRegionAvailable(&heapFreeList) | 
| #define | NutHeapAlloc(s) NutHeapRootAlloc(&heapFreeList, s) | 
| #define | NutHeapAllocClear(s) NutHeapRootAllocClear(&heapFreeList, s) | 
| #define | NutHeapFree(p) NutHeapRootFree(&heapFreeList, p) | 
| #define | NutHeapRealloc(p, s) NutHeapRootRealloc(&heapFreeList, p, s) | 
| #define | NutStackAlloc(s) NutHeapAlloc(s) | 
| #define | NutStackFree(p) NutHeapFree(p) | 
Typedefs | |
| typedef struct _HEAPNODE | HEAPNODE | 
| Heap memory node type.   | |
Functions | |
| void | NutHeapRootAdd (HEAPNODE **root, void *addr, size_t size) | 
| Add a new memory region to the heap.   | |
| size_t | NutHeapRootAvailable (HEAPNODE **root) | 
| Return the total number of bytes available.   | |
| size_t | NutHeapRootRegionAvailable (HEAPNODE **root) | 
| Return the size of the largest block available.   | |
| void * | NutHeapRootAlloc (HEAPNODE **root, size_t size) | 
| Allocate a block from heap memory.   | |
| void * | NutHeapRootAllocClear (HEAPNODE **root, size_t size) | 
| Allocate an initialized block from heap memory.   | |
| int | NutHeapRootFree (HEAPNODE **root, void *block) | 
| Return a block to heap memory.   | |
| void * | NutHeapRootRealloc (HEAPNODE **root, void *block, size_t size) | 
| Change the size of an allocated memory block.   | |
| int | NutHeapCheck (void) | 
| Check consistency of heap.   | |
| void | NutHeapDump (void *stream) | 
| Dump heap memory to a given stream.   | |
Variables | |
| HEAPNODE * | heapFreeList | 
| List of free nodes in normal memory.   | |
Heap management definitions.
Definition in file heap.h.
| #define NutHeapAdd | ( | a, | |
| s | |||
| ) | NutHeapRootAdd(&heapFreeList, a, s) | 
| #define NutHeapAvailable | ( | ) | NutHeapRootAvailable(&heapFreeList) | 
Definition at line 77 of file heap.h.
Referenced by LuaThread(), main(), NutDumpHeap(), NutSegBufInit(), NutTcpStateMachine(), ProcessRequests(), Service(), Sleeper1(), and UxmlParseStream().
| #define NutHeapRegionAvailable | ( | ) | NutHeapRootRegionAvailable(&heapFreeList) | 
| #define NutHeapAlloc | ( | s | ) | NutHeapRootAlloc(&heapFreeList, s) | 
Definition at line 86 of file heap.h.
Referenced by _sbrk(), AceOpen(), ADCInit(), AhdlcAt91Init(), AhdlcAt91Open(), AhdlcAvrInit(), AhdlcAvrOpen(), AhdlcRx(), AtCanInit(), CANBufferInit(), CFChange(), malloc(), MmCardMount(), NutConditionInit(), NutDnsGetResourceAll(), NutEncodeBase64(), NutMsgQStartTimer(), NutSegBufInit(), NutTcpDeviceWrite_P(), NutThreadCreate(), NutTimerCreate(), SpiMmcMount(), UartAvrOpen(), vfprintf_P(), vfscanf_P(), vsprintf_P(), vsscanf_P(), and WlanInit().
| #define NutHeapAllocClear | ( | s | ) | NutHeapRootAllocClear(&heapFreeList, s) | 
Definition at line 87 of file heap.h.
Referenced by NutMsgQCreate(), NutNetBufAlloc(), and NutNetBufClonePart().
| #define NutHeapFree | ( | p | ) | NutHeapRootFree(&heapFreeList, p) | 
Definition at line 88 of file heap.h.
Referenced by AceClose(), AhdlcAt91Close(), AhdlcAt91Init(), AhdlcAvrClose(), AhdlcAvrInit(), AhdlcRx(), CFChange(), free(), NutConditionFree(), NutDnsGetResourceAll(), NutNetBufAlloc(), NutNetBufCollect(), NutNetBufFree(), NutSegBufInit(), NutTcpDeviceWrite_P(), NutTimerProcessElapsed(), UartAvrClose(), vfprintf_P(), vfscanf_P(), vsprintf_P(), and vsscanf_P().
| #define NutHeapRealloc | ( | p, | |
| s | |||
| ) | NutHeapRootRealloc(&heapFreeList, p, s) | 
| #define NutStackAlloc | ( | s | ) | NutHeapAlloc(s) | 
Definition at line 102 of file heap.h.
Referenced by NutThreadCreate().
| #define NutStackFree | ( | p | ) | NutHeapFree(p) | 
Definition at line 103 of file heap.h.
Referenced by NutThreadDestroy().