I'm trying to figure out how to increase the memory space used by the Ciao
system. I'm running some very large programs.
In Ciao the memory areas are resized automatically, i.e., each
execution thread starts with a small set of stacks and when it runs
out of space larger stacks are allocated and everything moved there
(reallocation). If the system reports that it runs out of memory it
means it really cannot use more memory, so in order to be able to
terminate you have to optimize your program or reduce problem size.
Alternative you can use 'old Prolog tricks'. A well known one is:
main :-
read(X),
large_deterministic_computation_part1(X,Y),
large_deterministic_computation_part2(Y,Z),
write(Z).
==>
main :-
read(X),
large_deterministic_computation_part1(X,Y),
assert(foo(Y)),
fail.
main :-
retract(foo(Y)),
large_deterministic_computation_part2(Y,Z),
write(Z).
Has saved many but, ouch! ;-)
--
----------------------- The Ciao System Development Team --------------------
The CLIP Group | Technical University of Madrid
ciao(a)clip.dia.fi.upm.es | University of New Mexico
http://www.cliplab.org /
http://www.ciaohome.org
-----------------------------------------------------------------------------
==============================================================================
Message: Address: Action:
help majordomo(a)clip.dia.fi.upm.es Info. on useful commands
subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list
unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list
<whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list
-----------------------------------------------------------------------------
Archived messages:
http://www.clip.dia.fi.upm.es/Mail/ciao-users/
-----------------------------------------------------------------------------