[Gc] GC_get_bytes_since_gc locks

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Wed Aug 24 00:45:59 PDT 2011

On Wed, Aug 24, 2011 at 1:21 AM, Boehm, Hans <hans.boehm at hp.com> wrote:

> Is it possible to work around the problem by calling
> GC_get_bytes_since_gc_inner() if it exists, and GC_get_bytes_since_gc() if
> it doesn’t?

It can be done, but this requires more autoconf magic and hardcoding library
behavior. It also has the problem that GC_get_bytes_since_gc_inner() does
not exist right now, neither in 7.1 nor in any of the 7.2alpha versions.
There autoconf will detect that _inner does not exist and use the wrong

I am very much tempted to use GC_bytes_allocd, but gc_priv.h does not work
unless it is included with the same compilation flags and C preprocessor
definitions that BDWGC used -- and since these do not survive installation,
the variable is useless for external users.

My guess is that very few people (hopefully only one) are affected by this.
> Changing it back would I think make the interface less consistent, and
> probably make the most common usages of GC_get_bytes_since_gc() less likely
> to be correct.

I presume that all high level languages using some statistics of garbage
collection will rely on this function. AFAIK there is no other reliable,
backwards compatible, non-wrapping way to determine the amount of memory
allocated by the library than inspecting this value among collections.


Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://napali.hpl.hp.com/pipermail/gc/attachments/20110824/86cfab80/attachment.htm

More information about the Gc mailing list