Heap Functions

Functions
Heap Functions
Embryo

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. More...
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. More...

## 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

## ◆ embryo_data_heap_push()

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_NONE` otherwise.

References EMBRYO_CELL_NONE.

## ◆ embryo_data_heap_pop()

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.