Re: [PHP4BETA] ts_allocate_id and start_memory_manager problem.

From: Date: Wed, 01 Sep 1999 20:08:11 +0000
Subject: Re: [PHP4BETA] ts_allocate_id and start_memory_manager problem.
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-3982@lists.php.net to get a copy of this message
Maybe we could only do this in debug mode. We want to keep TSRM as fast as possible and every ASM op can make a difference if there are a lot of _FETCH()'s. Andi At 09:03 AM 9/1/99 +0200, Thies C. Arntzen wrote:
On Tue, 31 Aug 1999, Zeev Suraski wrote: At 18:13 31/08/99 , Thies C. Arntzen wrote:
hi andi, zeev, problem is: ts_allocate_id calls alloc_globals_ctor -> start_memory_manager -> start_memory_manager -> ALS_FETCH() *but* as ts_allocate_id hasn't returned a valid resource yet (still in
the
call) ALS_FETCH() will fetch the 1st allocated resource into alloc_globals. (bad idea).
Hmmm good call. I'll look into fixing it tomorrow.
please let resources start with 1 instead of 0 - that would make
debugging
so much easier!
It's not that simple, which is why I haven't gotten around to doing it. I hope to do it by the weekend. just adding one before returning it should do (and then of course substract on in get_resource etc;-) that way TSRM could barf loud when somebody asks for resource 0 (which - in the current implemetation - could be good or bad) tc Zeev -- Zeev Suraski <zeev@zend.com> http://www.zend.com/ For a PGP public key, finger bourbon@netvision.net.il
Thies C. Arntzen                 "One Big-Mac, Small Fries and a Coke!"
Digital Collections             Phone +49 40 235350 Fax +49 40 23535180
Hammerbrookstr. 93                              20097 Hamburg / Germany
-- PHP 4 Beta
--- Andi Gutmans <andi@zend.com> http://www.zend.com/

« previous php.version4 (#3982) next »