nut/include/sys/heap.h File Reference


Detailed Description

Heap management definitions.

#include <cfg/memory.h>
#include <sys/types.h>

Data Structures

struct  _HEAPNODE
 Heap memory node information structure. More...

Defines

#define ALLOC_THRESHOLD   6
 Allocation threshold.
#define NutStackAlloc(size)   NutHeapAlloc(size)
#define NutStackFree(block)   NutHeapFree(block)

Typedefs

typedef _HEAPNODE HEAPNODE
 Heap memory node type.

Functions

void NutHeapAdd (void *addr, size_t size)
 Add a new memory region to the free heap.
void * NutHeapAlloc (size_t size)
 Allocate a block from heap memory.
void * NutHeapAllocClear (size_t size)
 Allocate an initialized block from heap memory.
size_t NutHeapAvailable (void)
 Return the number of bytes available.
int NutHeapFree (void *block)
 Return a block to heap memory.

Variables

HEAPNODE *volatile heapFreeList
 List of free nodes.


Define Documentation

#define ALLOC_THRESHOLD   6

Allocation threshold.

Might be increased to avoid creating too many small nodes.


Generated on Tue Jan 23 21:12:26 2007 for BTnut System Software by doxygen 1.4.7