[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
heap eaten?
Hello,
I have been attempting to use a trick mentioned on this
mailing list some time ago to save memory whilst using mu-prolog.
The trick is to wrap up memory-hungry premises to rules in
a call to prove the predicate save_mem() where save_mem is defined:
save_mem(G) :- save_mem1(G).
save_mem(G) :- foo(G),retract(foo(G)).
save_mem1(G) :- G,assert(foo(G)),!,fail.
This trick works nicely.. it saves a lot of memory. Unfortunately
I sometimes get the message:
heap eaten
** sun4 : machine error : segmentation fault
whilst executing the typol definition that uses save_mem().
It tends to happen when I use save_mem() frequently in the
definition.
Is the heap size related to the options I run Centaur with or just
some space on the machine? The point at which centaur runs out of
heap seems to depend on my interpreter definition rather than the
machine I run it on. Is there a default heapsize?
Thanks,
Brad Alexander