ID:               48471
 User updated by:  busia at tiscali dot it
 Reported By:      busia at tiscali dot it
 Status:           Open
 Bug Type:         Feature/Change Request
 Operating System: Irrilevant
 PHP Version:      5.3CVS-2009-06-04 (snap)
 New Comment:

I saw that when I create more than 1023 objects, the unremovable cache
of the objects between 1024° and 4095° grow as 64 bytes for object,
between 4096° and 8191° grows as 128 bytes for object. It grows
exponentially and this is a biggest problem.


Previous Comments:
------------------------------------------------------------------------

[2009-06-04 13:02:19] busia at tiscali dot it

Description:
------------
In bug report #48434 lbarn...@php.net wrote me:
---------------------------
PHP uses an array internally to store all objects. When you create more
objects, the array is grown. When you destroy some objects, the array is
not resized, so that creating other objects is faster.

This is the difference you see; ~32 bytes per object.

This is not due to the allocator. There is a few other caches of this
kind in PHP that make it running faster.
---------------------------

Using many objects this is a problem, I need a function to force
resizing of the internal object array. I know that this would slow down
the script but this function (like mysql_free_result) would be useful in
many situations (like working on many objects array). Is it possible to
have a function like that?

Thanks



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=48471&edit=1

Reply via email to