
Next: Hash TablesJump
Up: Integrating Abstract Machines:
Previous: Integrating Abstract Machines:
In the GAMA, only one memory area for all abstract machines
exists: the general purpose
memory Memory. This memory is managed via a free list which contains
all areas in Memory which are currently unused. Memory can be allocated
and deallocated with the following functions
:
- (gmem.alloc
) returns the address of the newly allocated
memory area of size
- (gmem.dealloc
) deallocates the memory area
starting at
with size
- (gmem.defractionize) cleans up the free list, i.e. adjacent
freed memory areas are collected (after calls to gmem.dealloc)
Memory cells can be accessed with the following functions:
- (gmem.put
) stores
in the cell with address
- (gmem.get
) returns the contents of the cell with
address