Issues

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

Description

add handling of objects for value in Zend_Memory_Manager

add an interface for memoryable objects


interface Zend_Memory_Memoryable extends Serializable {

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

and in memory manager


if (is_object($value) && $value implements Zend_Memory_Memoryable) {
    $size = $value->getMemoryUsage();
}

Comments

Please evaluate and categorize/assign as necessary.

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.

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.