Re: How to detect GC warnings?

[email protected]
Newsgroups gmane.lisp.scheme.bigloo
Organization Inria
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.