On Mon, Nov 06, 2023 at 03:06:04PM +0100, Ralf Hemmecke wrote:
> I thought that ")clear complete" basically resets FriCAS to a state which is
> the same like after starting a new session. Seemingly it isn't.
>
> I had some computation with series that consumed quite some GBs. After
> ")clear complete" the memory monitor did not show any freeing of space.
> What would I have to do to release all the space that is claimed by FriCAS?
Do some computation? If you do
)lisp (room)
you should see some change. OTOH ")clear completely" does not
call garbage collector, and most memory can be reclaimed only
after garbage collection. Also, returning memory to system
is done by garbage collector, but depends on collector policy.
If garbage collector thinks that memory will be needed in near
future it may decide to keep it allocated. Also, sbcl and Clozure CL
want to have continous piece of memory without holes, so they
allocate big hunk of memory and never free it. So, at operating
system level you see large and almost constant use of virtual memory.
Use of real memory depends on system activity, basically system
will swap unused memory when it needs it. Kernel will try to
replace zero pages by reference to single page, but this may
take some time.
As long as there is avaliable memory GCL does not run garbage collector,
so nothing gets freed.
In general, it is normal that Lisp system uses more memory that
strictly needed for user data. I find GCL behaviour extreme
and do not like it. Other Lisp system try to be nicer, but
there is tradoff between use of time for memory management
and prompt release of unused memory. So it is normal that
at some moments Lisp uses much more memory than strictly
needed.
--
Waldek Hebisch
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/fricas-devel/ZUj6WG8qBriU9d7F%40fricas.org.