ZF-3123: add handling of objects for value in Zend_Memory_Manager

Issue Type: New Feature Created: 2008-04-16T17:25:55.000+0000 Last Updated: 2012-11-20T20:52:37.000+0000 Status: Closed Fix version(s): Reporter: Marc Bennewitz (GIATA mbH) (mben) Assignee: None Tags: - Zend_Memory

Related issues: Attachments:


add handling of objects for value in Zend_Memory_Manager

add an interface for memoryable objects

<pre class="highlight">
interface Zend_Memory_Memoryable extends Serializable {

    * Get used memory for this object in bytes
    * @return int
    public function getMemoryUsage();

and in memory manager

<pre class="highlight">
if (is_object($value) && $value implements Zend_Memory_Memoryable) {
    $size = $value->getMemoryUsage();


Posted by Wil Sinclair (wil) on 2008-04-18T16:13:33.000+0000

Please evaluate and categorize/assign as necessary.

Posted by Tobias Petry (ice-breaker) on 2009-05-09T10:18:54.000+0000

I need the caching of arrays/objects too. Zend_Memory uses Zend_Cache for swapping, it can't be too hard to implement, or?

Maybe arrays and objects could be serialized in Zend_Memory_Value to allow correct calculations of memory usage and unserialized on access.

Posted by Rob Allen (rob) on 2012-11-20T20:52:37.000+0000

Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".

Feel free to re-open and provide a patch if you want to fix this issue.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.