Heap Functions
The heap is an area of memory that can be allocated for program use at runtime. More...Functions | |
| EAPI Embryo_Cell | embryo_data_heap_push (Embryo_Program *ep, int cells) |
| Increases the size of the heap of the given virtual machine by the given number of Embryo_Cells. | |
| EAPI void | embryo_data_heap_pop (Embryo_Program *ep, Embryo_Cell down_to) |
| Decreases the size of the heap of the given virtual machine down to the given size. | |
Detailed Description
The heap is an area of memory that can be allocated for program use at runtime.The heap functions here change the amount of heap memory available.
Function Documentation
| EAPI void embryo_data_heap_pop | ( | Embryo_Program * | ep, | |
| Embryo_Cell | down_to | |||
| ) |
Decreases the size of the heap of the given virtual machine down to the given size.
- Parameters:
-
ep The program with the given virtual machine. down_to The given size.
| EAPI Embryo_Cell embryo_data_heap_push | ( | Embryo_Program * | ep, | |
| int | cells | |||
| ) |
Increases the size of the heap of the given virtual machine by the given number of Embryo_Cells.
- Parameters:
-
ep The program with the given virtual machine. cells The given number of Embryo_Cells.
- Returns:
- The address of the new memory region on success.
EMBRYO_CELL_NONEotherwise.
References EMBRYO_CELL_NONE.
Referenced by embryo_program_run().