Next: Compiling and Consulting
Up: System Description
Previous: Command Line Arguments
  Contents
  Index
Memory Management
All execution stacks are automatically expenaded in Version 2.2
including the local stack/heap region, the trail/choice point region
and the completion stack region. Each of these regions begin with an
initial value set by the user (or the default stated in
Section 3.5), and double their size until it is not
possible to do so with available system memory. At that point XSB
tries to find the maximal amount of space that will still fit in
system memory. Garbage collection is automatically performed for
retracted clauses. In addition, heap garbage collection is
automatically included when the -enable-chat configuration
option is used. (It can be turned off; see the predicate
garbage_collection/1.)
The program area (the area into which the code is loaded) is also
dynamically expanded as needed, and the area occupied by dynamic code
(created using assert/1, or the standard predicate
load_dyn/1) is reclaimed when that code is retracted. Version 1.8
improves memory management for retracted dynamic code.
Version 2.2 provides memory management for table space as well. Space for
tables is dynamically allocated as needed and reclaimed through use of
the predicate abolish_all_tables/0
(see Section 6.12).
Next: Compiling and Consulting
Up: System Description
Previous: Command Line Arguments
  Contents
  Index
Baoqiu Cui
2000-04-23