heap.h File Reference

VM Heap. More...

Go to the source code of this file.

Defines

#define HEAP_GC_NF_THRESHOLD   (512)
#define DEBUG_PRINT_HEAP_AVAIL(s)

Functions

PmReturn_t heap_init (void)
PmReturn_t heap_getChunk (uint16_t requestedsize, uint8_t **r_pchunk)
PmReturn_t heap_freeChunk (pPmObj_t ptr)
uint16_t heap_getAvail (void)


Detailed Description

VM Heap.

VM heap header.


Define Documentation

#define HEAP_GC_NF_THRESHOLD   (512)

The threshold of heap.avail under which the interpreter will run the GC just before starting a native session.


Function Documentation

PmReturn_t heap_freeChunk ( pPmObj_t  ptr  ) 

Places the chunk back in the heap.

Parameters:
ptr Pointer to object to free.

uint16_t heap_getAvail ( void   ) 

Returns:
Return number of bytes available in the heap

PmReturn_t heap_getChunk ( uint16_t  requestedsize,
uint8_t **  r_pchunk 
)

Returns a free chunk from the heap.

The chunk will be at least the requested size. The actual size can be found in the return chunk's od.od_size.

Parameters:
requestedsize Requested size of the chunk in bytes.
r_pchunk Addr of ptr to chunk (return).
Returns:
Return code

PmReturn_t heap_init ( void   ) 

Initializes the heap for use.

Returns:
nothing.


Generated on Wed Feb 24 13:37:02 2010 for Python-on-a-chip by  doxygen 1.5.9