heap.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef __HEAP_H__
00017 #define __HEAP_H__
00018
00019
00032 #define HEAP_GC_NF_THRESHOLD (512)
00033
00034
00035 #ifdef __DEBUG__
00036 #define DEBUG_PRINT_HEAP_AVAIL(s) \
00037 do { uint16_t n; heap_getAvail(&n); printf(s "heap avail = %d\n", n); } \
00038 while (0)
00039 #else
00040 #define DEBUG_PRINT_HEAP_AVAIL(s)
00041 #endif
00042
00043
00049 PmReturn_t heap_init(void);
00050
00061 PmReturn_t heap_getChunk(uint16_t requestedsize, uint8_t **r_pchunk);
00062
00068 PmReturn_t heap_freeChunk(pPmObj_t ptr);
00069
00071 #if PM_HEAP_SIZE > 65535
00072 uint32_t
00073 #else
00074 uint16_t
00075 #endif
00076 heap_getAvail(void);
00077
00078 #ifdef HAVE_GC
00079
00084 PmReturn_t heap_gcRun(void);
00085
00092 PmReturn_t heap_gcSetAuto(uint8_t auto_gc);
00093 #endif
00094
00095 #endif