PCE version 4C hlp_buffer first_fragment last_fragmenteditorsmodifiedundo_buffer_sizesyntax generationrequest_renumberfileOIxC hlp_fragment text_buffernextpreviousstylelabelOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOI xRIOI xRIOI xRIOI xRIOI xRInRI NboldnÒ RI NboldnRI Nboldng/RI Nboldnµ RINboldnÁ RINboldn RINboldnkRINboldn½ RINboldnŠ"RINboldnmRIN emphasizenÙ5nNtitleNmainRI naI'Adefault_syntax_tableI …uCfilenamepathkindstatusfilterOIxN.e:/jan/installed/pl/xpce/appl-help/plprefs.hlpdNbinaryNwriten:SWI-Prolog stacks limits This tool allows to specify the SWI-Prolog stack limits. On 32-bit machines, SWI-Prolog can handle upto 128 Mbytes per stack. By default, the stack is limited to much lower values to avoid errornous programs from claiming all system resources. If your program runs out of stack, first check whether you made a programming error such as unbound recursion or leaving excessive amounts of choice-points. The SWI-Prolog GUI tracer can be used to examine the choice-points. If your program is ok but requires more stack, you can use this tool to register new default stack-sizes in the Windows registry. The new settings only become effective the next time you start SWI-Prolog. The reference manual discusses the stacks in detail. Here is a short summary: * Local Stack The local stack is used to store parent-environments and choice-points. Determinism and tail-recursion are the techniques to minimise local stack usage. * Global Stack The global stack is used to store data that does not fit into a single machine word: compound terms, floats, large integers and strings. Determinism and proper data-design are the techniques to minimise global stack usage. * Trail Stack The trail stack stores bindings to enable backtracking. Determinism is the technique to minimise trail-stack requirements. Please take note of the following: * Debug mode disables tail-recursion optimisation Therefore Prolog may requires a lot more space while running in debug mode (i.e. looking for spy-, trace- or breakpoints). * Garbage collection Is started after the stacks have grows significantly after the last GC or Prolog is approaching the stack-limits. It only affects the global and trail-stacks. * Determinism Is the key to avoid wasting memory. Non-determinism forces choice-point creation as well as preservation of the environments, date and undo-information to return to choice-points. This doesn't mean a Prolog program should not use backtracking, but does imply that memory-hungry applications should carefully avoid not-needed choicepoints. rIxx