[Gc] GC_get_bytes_since_gc locks

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Tue Aug 23 05:27:57 PDT 2011


Formerly this function was very simple could be called from a routine that
marks or that perform some task before or after garbage collection (one of
the hooks). Now this is not the case. A useless lock has been inserted in a
function that all it does is read a C variable. Really, is this necessary?

GC_API size_t GC_CALL GC_get_bytes_since_gc(void)
{
    size_t value;
    DCL_LOCK_STATE;
    LOCK();
    value = GC_bytes_allocd;
    UNLOCK();
    return value;
}


-- 
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://napali.hpl.hp.com/pipermail/gc/attachments/20110823/36e1db0d/attachment.htm


More information about the Gc mailing list