[#61424] [REJECT?] xmalloc/xfree: reduce atomic ops w/ thread-locals — Eric Wong <normalperson@...>

I'm unsure about this. I _hate_ the extra branches this adds;

13 messages 2014/03/12

[ruby-core:61172] Re: [ruby-changes:33145] normal:r45224 (trunk): gc.c: fix build for testing w/o RGenGC

From: Eric Wong <normalperson@...>
Date: 2014-03-01 09:47:37 UTC
List: ruby-core #61172
SASADA Koichi <ko1@atdot.net> wrote:
> (2014/03/01 16:15), normal wrote:
> > -#ifdef RGENGC_ESTIMATE_OLDMALLOC
> > +#if (USE_RGENGC) && defined(RGENGC_ESTIMATE_OLDMALLOC)
> 
> Is this check needed?
> 
> RGENGC_ESTIMATE_OLDMALLOC is always 0 if USE_RGENGC is not defined.

I used "#define USE_RGENGC 0" in ruby.h, so USE_RGENGC
is defined.

Looking more closely, I suppose just using #if RGENGC_ESTIMATE_OLDMALLOC
(not #ifdef) will work...

In This Thread