Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
heap.h File Reference
VM Heap. More...
Go to the source code of this file.
Functions | |
| PmReturn_t | heap_init (uint8_t *base, uint32_t size) |
| Initializes the heap for use. | |
| PmReturn_t | heap_getChunk (uint16_t requestedsize, uint8_t **r_pchunk) |
| Returns a free chunk from the heap. | |
| PmReturn_t | heap_freeChunk (pPmObj_t ptr) |
| Places the chunk back in the heap. | |
| uint32_t | heap_getAvail (void) |
| uint32_t | heap_getSize (void) |
| PmReturn_t | heap_gcRun (void) |
| Runs the mark-sweep garbage collector. | |
| PmReturn_t | heap_gcSetAuto (uint8_t auto_gc) |
| Enables (if true) or disables automatic garbage collection. | |
| void | heap_gcPushTempRoot (pPmObj_t pobj, uint8_t *r_objid) |
| Pushes an object onto the temporary roots stack if there is room to protect the objects from a potential garbage collection. | |
| void | heap_gcPopTempRoot (uint8_t objid) |
| Pops from the temporary roots stack all objects upto and including the one denoted by the given ID. | |
Detailed Description
VM Heap.
VM heap header.
Definition in file heap.h.
Function Documentation
| PmReturn_t heap_freeChunk | ( | pPmObj_t | ptr ) |
| void heap_gcPopTempRoot | ( | uint8_t | objid ) |
| void heap_gcPushTempRoot | ( | pPmObj_t | pobj, |
| uint8_t * | r_objid | ||
| ) |
| PmReturn_t heap_gcRun | ( | void | ) |
| PmReturn_t heap_gcSetAuto | ( | uint8_t | auto_gc ) |
| uint32_t heap_getAvail | ( | void | ) |
| 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
| uint32_t heap_getSize | ( | void | ) |
| PmReturn_t heap_init | ( | uint8_t * | base, |
| uint32_t | size | ||
| ) |
Generated on Tue Jul 12 2022 23:13:47 by
1.7.2