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

From: Date: Thu, 05 Nov 2009 19:29:50 +0000
Subject: Re: Feedback requested on using #defines to improve the performance of the TSRMG macro
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-45957@lists.php.net to get a copy of this message
so should be a UUID rather than a user defined int you cannot avoid collision with your system, it's a dangerous way to go. Best, On Thu, Nov 5, 2009 at 11:20 AM, Arvind Srinivasan <yoarvi@gmail.com> wrote: >> 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 > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.internals (#45957) next »