[Gc] GC_get_bytes_since_gc locks
hans.boehm at hp.com
Tue Aug 23 11:29:30 PDT 2011
In general, yes, it is necessary. See for example my HotPar 2011 paper: http://www.usenix.org/events/hotpar11/tech/final_files/Boehm.pdf .
It probably makes sense to introduce a second version that's callable from contexts in which the lock is already held, i.e. GC_get_bytes_since_gc_inner(), which would hopefully also solve your problem.
From: gc-bounces at linux.hpl.hp.com [mailto:gc-bounces at linux.hpl.hp.com] On Behalf Of Juan Jose Garcia-Ripoll
Sent: Tuesday, August 23, 2011 5:28 AM
To: gc at linux.hpl.hp.com
Subject: [Gc] GC_get_bytes_since_gc locks
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)
value = GC_bytes_allocd;
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Gc