Hi All,
I use "storage-condition" to deal with allocation problems. But sometimes the low-level debugger is entered. May be the system fails to raise the condition because of no enough memory. Can I do proper exception handling
in such situation instead of crashing or entering to low level debugger? Can I lock some memory for exception handling to be sure that storage-condition is able to raise properly?
I wrote very simple program that reproduce the issue.
I got following:
--
Thanks,
Dmytro Bilous
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________
Sbcl-help mailing list
Sbcl...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sbcl-help
I try to avoid entering to LDB and try to find out a way to handle this type of error inside application. I wrote small program that just reproduce real workload in my application. This example is getting bitten by generational
trap.
Some time I get storage-condition but sometime I fall down to LDB.
I try to avoid to call (gc :full t) directly from code because I have a multi-threaded application and if every thread will call full gc then performance dramatically decreased
Questions:
1. Can I tuning GC to reserve memory for condition handling?
2. Can I tuning GC to call storage-condition early (when some amount of free memory still exists)?
3. Can I tuning GC to call garbage collection across all generations automatically when low memory?
3. Are there any other solutions?
Hi All,
I have tried to run "test-gen-trap" on different implementations. And figured out that Allegro Lisp call global GC when reach some memory limit.
So I try to do the same with after-gc-hooks. I set limit to 100M:
So now when available memory is less then 100M (gc :full t) will be called. Seems at least for now that should solve our issue.
--
Thanks,
Dmytro
Hi Dmytro,
SBCL has a couple of GC knobs you may want to try tuning: one is the number of generations and the other one is generation-minimum-age-before-gc.
With the default settings the amount of garbage SBCL may accumulate is something like 2 * the number of generations * size of new referenced data. The size of
new referenced data in your test is about 80Mb and your dynamic space size seems to be 1Gb. That is probably too tight.
SBCL uses a copying collector, so memory fragmentation is not an issue.