Re: Feedback requested on using #defines to improve the performance of the TSRMG macro

From: Date: Thu, 05 Nov 2009 19:20:09 +0000
Subject: Re: Feedback requested on using #defines to improve the performance of the TSRMG macro
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-45956@lists.php.net to get a copy of this message
> Does the GLOBALS_ID_BASE idea work?  In > "ts_allocate_reserved_id(GLOBALS_ID_BASE+1...)" each extension would > anyway need to reserve an increment to avoid clashes.  Also, why is I didn't really try using this. When I added it, I thought it might be useful for modules that live outside the PHP source tree. They could then define their constants using #define FOO_ID (GLOBALS_ID_BASE + 3) rather than hardcoding 33. As you point out, they would still need to reserve an increment. > GLOBALS_ID_BASE 30 when the largest reserved value is 18?  Maybe I'm > missing something. > I reserved IDs for the subsystems I thought were core. I was sure there'd be others that I'd missed and so I left space for more. > Would there be significant memory space or locality issues if one ID > per extension in the PHP source bundle was reserved upfront, even if > those extensions were never enabled? > I'll run some tests and see what impact this has. Arvi

« previous php.internals (#45956) next »