MemoryManager
Methods
__construct()
php
public function __construct(\pocketmine\Server $server)canUseChunkCache()
php
public function canUseChunkCache() : boolDeprecated
Deprecated.
check()
php
public function check() : voidCalled every tick to update the memory manager state.
dumpMemory()
php
public static function dumpMemory(mixed $startingObject, string $outputFolder, int $maxNesting, int $maxStringSize, \Logger $logger) : voidDeprecated
Deprecated.
Static memory dumper accessible from any thread.
dumpServerMemory()
php
public function dumpServerMemory(string $outputFolder, int $maxNesting, int $maxStringSize) : voidDumps the server memory into the specified output folder.
getGlobalMemoryLimit()
php
public function getGlobalMemoryLimit() : intgetViewDistance()
php
public function getViewDistance(int $distance) : intReturns the allowed chunk radius based on the current memory usage.
isLowMemory()
php
public function isLowMemory() : booltrigger()
php
public function trigger(int $memory, int $limit, bool $global = false, int $triggerCount = 0) : voidTriggers garbage collection and cache cleanup to try and free memory.
triggerGarbageCollector()
php
public function triggerGarbageCollector() : int