Re: Re: [PATCH] Automatic module globals management

From: Date: Fri, 09 Jun 2006 19:09:30 +0000
Subject: Re: Re: [PATCH] Automatic module globals management
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-24052@lists.php.net to get a copy of this message
SF>>How is it going to be dependent in any way on a module that was loaded SF>>after it was?! As far as understand the code, table_size - zend_dl_module_count() formula starts with last allocated ID and deallocates one ID per module unloaded, starting from the latest loaded module. However, if there are N modules that do not allocate IDs, it will deallocate N IDs for modules that have allocated IDs. BTW, I see no reason why this expression can't go even negative with present code, given enough non-allocating modules.
You'd need to be _dynamically_ loading somewhere over 24 modules for that to happen, and this is me testing with a --disable-all build. Normally it'd be somewhere nearer 35 plus. All or most of those modules would need to have no resource id, and it would need to be a ZTS build. Whatever way you look at it, that's a screwed up configuration. I'm not fighting for my code here, I'm fighting for a fix. We need to get hold of a sane resource id in order to free modules centrally. Yes it would be nicer if ts_free_id() returned int rather than void so we could at least know if anything happened on that call, but I'm reluctant to touch the function signature in an elderly piece of code. - Steph

« previous php.internals (#24052) next »