__construct()
__destruct()
create()
createLocked()
getMemoryLimit()
getMinSize()
setMemoryLimit()
setMinSize()
_create()
commit()
generateMemManagerId()
swap()
swapCheck()
$cache
$lastModified
$managerId
$memoryLimit
$memorySize
$minSize
$nextId
$sizes
$unloadCandidates
Memory manager
This class encapsulates memory menagement operations, when PHP works in limited memory mode.
__construct(\Zend\Cache\Storage\StorageInterface $cache)
If cache is not specified, then memory objects are never swapped
__destruct()
Clean up cache storage
create(string $value) : \Zend\Memory\Container\ContainerInterface
createLocked(string $value) : \Zend\Memory\Container\ContainerInterface
getMemoryLimit() : int
int
getMinSize() : int
int
setMemoryLimit(int $newLimit)
int
setMinSize(int $newSize)
int
_create(string $value, bool $locked) : \Zend\Memory\Container\ContainerInterface
commit()
generateMemManagerId()
swap(\Zend\Memory\Container\Movable $container, int $id)
$lastModified : \Zend\Memory\Container\Movable
It's used to reduce number of calls necessary to trace objects' modifications Modification is not processed by memory manager until we do not switch to another object. So we have to trace only first object modification and do nothing for others
$managerId : int
$memoryLimit : int
Default value is 2/3 of memory_limit php.ini variable Negative value means no limit
$memorySize : int
$minSize : int
Default value is 16K Negative value means that memory objects are never swapped
$nextId : int
$sizes : array
This list is used to calculate modification of object sizes
array(
$unloadCandidates : array
It also represents objects access history. Last accessed objects are moved to the end of array
array(