Hi!
When compiled for multi-threaded (#ifdef ZTS ) operation, the various subsystems in PHP use dynamically allocated (ts_allocate_id) identifiers to index into the thread-local storage for each subsystem. These dynamically allocated ids are used by macros such as CG, EG, PG, AG.
I think it makes sense. One note on the patch - you don't have to replace XXX_core_globals_id with XXX_GLOBALS_ID everywhere, especially in init code, etc. which is not performance-sensitive, as you already have these values assigned. Also, ts_allocate_reserved_id doesn't really allocate anything anymore, as far as I can see. 50 reserved IDs can be an overkill though... I'd say only core IDs get revervations, all extensions should be dynamic. Also, ts_allocate_reserved_id seems to allow zero size as argument, but then allows to override such ID with another call of ts_allocate_reserved_id, while it does not allow this for non-zero sizes.
-- Stanislav Malyshev, Zend Software Architect s...@zend.com http://www.zend.com/ (408)253-8829 MSN: s...@zend.com -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php