XLISP > XLISP 2.0  -  Contents  -  Reference  -  Previous | Next

alloc


Type:   -   function (subr)
Source:   -   xldmem.c

Syntax

(alloc size)
size - the number of nodes to allocate as an integer
returns - the old number of nodes to allocate

Description

The 'alloc' function changes the number of memory nodes allocated per segment whenever memory is expanded. The previous number of nodes allocated per segment is the value returned as the result. The power-up default is 1000 nodes per segment. Note that 'alloc' does not, itself, expand memory. You need to execute the expand function to do the expand operation.

Examples

(room)        ; prints  Nodes:       4000
              ;         Free nodes:  1669
              ;         Segments:    4
              ;         Allocate:    1000
              ;         Total:       52570
              ;         Collections: 8
              ; returns NIL

(alloc 2000)  ; returns 1000

(room)        ; prints  Nodes:       4000
              ;         Free nodes:  1655
              ;         Segments:    4
              ;         Allocate:    2000
              ;         Total:       52570
              ;         Collections: 8
              ; returns NIL

See the alloc function in the XLISP 2.0 manual.

  Back to Top


XLISP > XLISP 2.0  -  Contents  -  Reference  -  Previous | Next