[Gc] GC_get_bytes_since_gc locks
wingo at pobox.com
Wed Aug 24 08:04:16 PDT 2011
On Wed 24 Aug 2011 16:37, Juan Jose Garcia-Ripoll <juanjose.garciaripoll at googlemail.com> writes:
> On Wed, Aug 24, 2011 at 3:53 PM, Andy Wingo <wingo at pobox.com> wrote:
> Things work fine. We do use GC_get_bytes_since_gc, but apparently
> while holding the alloc lock.
> I checked the Guile sources and according to the current understanding
> of the library it is wrong.
Thanks for looking! I should poke into ECL some day, I'm sure there is
interesting code there.
But I think you are mistaken here, that call is not in a pre-GC hook, so
there's no deadlocking problem. Or are you saying that I should be
> ./libguile/gc.c: heap_size = GC_get_heap_size ();
> ./libguile/gc.c: free_bytes = GC_get_free_bytes ();
> ./libguile/gc.c: bytes_since_gc = GC_get_bytes_since_gc ();
within an alloc lock?
More information about the Gc