next up previous index
Next: The Trail Stack Up: Introduction Previous: The Control Stack

The Global Stack

  The Global Stack holds Prolog structures, lists, strings and long numbers. So the user's selection of data structures is largely responsible for the growth of this stack (cf. gif). In coroutining mode, delayed goals also consume space on the Global Stack. It also stores source variable names for terms which were read in with the flag variable_names being on. When this feature is not needed, it should be turned off so that space on the global stack is saved.

The global stack grows while a program creates data structures. It is popped only on failure. ECLiPSe therefore provides a garbage collector for the Global Stack which is called when a certain amount of new space has been consumed. See section gif for how this process can be controlled. Note again that unnecessary nondeterminism reduces the amount of garbage that can be reclaimed and should therefore be avoided.



Micha Meier
Mon Mar 4 12:11:45 MET 1996