From:             [EMAIL PROTECTED]
Operating system: Any
PHP version:      4.1.2
PHP Bug Type:     Feature/Change Request
Bug description:  Get size of memory allocated in script

I'm developing code libraries for use in web projects. Its important that
the code be memory effecient, but there is no way to track this
currently.

The way php handles objects and arrays it's hard to know when copies are
being made internally. As I understand it, if you have $a=$b in your
script, if $b is an object or array, its not actually copied. Only if
there was a change in one of the elements through $a, does the the object
get copied and the change applied on the copy.

So it would be very useful to have a function that reports on the internal
memory allocations being made by a script, so we one can track if
excessive copying is being made.

Just returning the size would be good enough. Being able to get it in
categories (ie. resources, arrays, objects, references) would be
fantastic.


-- 
Edit bug report at http://bugs.php.net/?id=16564&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=16564&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=16564&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=16564&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16564&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16564&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16564&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=16564&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=16564&r=submittedtwice

Reply via email to