Hi Sven,

> Hi all.
> 
> Is there an easy way to detect GC warnings like
> 
> GC Warning: Failed to expand heap by ...
> GC Warning: Out of Memory! Heap size: ... Returning NULL!
> 
> inside a running bigloo-compiled program?
> 
> Background:
> I would like to cleanly shutdown the program and initiate a restart.
Apparently the collector exposes a bunch of setters/getters that
should let you implement that.

Have a look at gc-7.5.0-27may2016/include/gc.h

and check the function GC_oom_func. I think that the one you should use.
The problem is that, it probably makes no sens to bind it in the Scheme
world as this function is called when it is no longer possible to
allocate new objects.

Cheers,

-- 
Manuel

Reply via email to