(B) Runtime Environment Extensions


Runtime Environment Extension Procedures


(auxmem-maxsize) returns the maximum allocable auxiliary memory in bytes. Auxiliary memory is allocated to store leave data structure contents (like bitmaps and greymaps).

[1] auxmem-maxsize
#<primitive-procedure auxmem-maxsize>
[2] (auxmem-maxsize)


(auxmem-size) returns the currently size of allocated auxiliary memory in bytes.

[1] (auxmem-size)
[2] (define a (bitmap-create 100 100))
[3] (auxmem-size)


(stat) performs a garbage collection and displays several useful values concerning the status of the currently running instance of Inlab Scheme.


[1] (stat)
created: Mar  4 2021 19:39:35
destructive macro expansion is ON
running on a 64-bit machine
Heap   : 4.0 MB, 40067 DWords of 262144 used, 84.7157 % free
AuxMem : 0 bytes of 16777216 used, 100 % free
Symbols: 934 Symbols of 2048 used, 1114 available
Hash   : 834 entries of 4096 used, 3262 free, max. length of bucket-list: 4
Stacks : 11/16384 (pstack) 5/16384 (cstack)

The creation date and time are shown (compile time). The “destructive macro expansion” is always ON (it can be switched off internally for testing purposes).

The “native word size” of the machine on which Inlab-Scheme runs is indicated in the third line.

The size of Auxiliary Memory is displayed next (this memory is NOT allocated and just a notion of size when Inlab Scheme should perform a garbage collection). Auxiliary Memory is used by Inlab Scheme to store all “auxiliary objects” like bitmaps, greymaps, colormaps and internal buffers.

The current number of symbols is displayed. The symbol memory is extended automatically if the current chunk of space is exceeded.

The hash table information may be an indicator to increase it if the “max. length of bucket list” is obviously too large (e.g. > 4). This could happen if your program uses very large amounts of symbols.

Finally the usage of the internal two stacks is displayed with its current position (stack pointer) and the total size.

We are using stat to automatically prove the proper tail-recursive implementation of Inlab Scheme regarding stack allocations.