allocated_cells

Gamma: Version 4.0
Prev |  | Next

# `allocated_cells`

`allocated_cells` -- gives the number of allocated and free cells.

## Syntax

    allocated_cells ()

## Arguments

none

## Returns

A list containing the number of allocated cells and the number of free cells currently held by the memory management system.

## Description

The memory management system allocates cells as required to continue execution, limited only by operating system memory. Once cells have been allocated, they are placed on the heap by the garbage collector and re-used. New cells are only allocated from the operating system if the garbage collector is unable to fulfill a request for more memory from the running Gamma or Lisp program. This function returns the number of cells which are currently in use, and the number of free cells remaining on the heap. The sum of these numbers is the total number of cells allocated by the interpreter.

## Example

This example shows 380 cells in use and 1620 cells free on the heap, for a total of 2000 cells available.

        Gamma> allocated_cells();
        (380 1620 0 0 0 0 0 0)
        Gamma>

## See Also

`free_cells`, `gc`

Prev | Home | Next
Profiling and Debugging | Up | `eval_count`

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.