PocketMine-MP 5.21.2 git-b2aa6396c3cc2cafdd815eacc360e1ad89599899
|
Public Member Functions | |
__construct (private Server $server) | |
canUseChunkCache () | |
check () | |
dumpServerMemory (string $outputFolder, int $maxNesting, int $maxStringSize) | |
getGlobalMemoryLimit () | |
getViewDistance (int $distance) | |
isLowMemory () | |
trigger (int $memory, int $limit, bool $global=false, int $triggerCount=0) | |
triggerGarbageCollector () | |
Static Public Member Functions | |
static | dumpMemory (mixed $startingObject, string $outputFolder, int $maxNesting, int $maxStringSize, \Logger $logger) |
Definition at line 73 of file MemoryManager.php.
pocketmine\MemoryManager::__construct | ( | private Server | $server | ) |
Definition at line 104 of file MemoryManager.php.
pocketmine\MemoryManager::canUseChunkCache | ( | ) |
Definition at line 166 of file MemoryManager.php.
pocketmine\MemoryManager::check | ( | ) |
Called every tick to update the memory manager state.
Definition at line 210 of file MemoryManager.php.
|
static |
Static memory dumper accessible from any thread.
Definition at line 287 of file MemoryManager.php.
pocketmine\MemoryManager::dumpServerMemory | ( | string | $outputFolder, |
int | $maxNesting, | ||
int | $maxStringSize ) |
Dumps the server memory into the specified output folder.
Definition at line 271 of file MemoryManager.php.
References pocketmine\server().
pocketmine\MemoryManager::getGlobalMemoryLimit | ( | ) |
Definition at line 162 of file MemoryManager.php.
pocketmine\MemoryManager::getViewDistance | ( | int | $distance | ) |
Returns the allowed chunk radius based on the current memory usage.
Definition at line 173 of file MemoryManager.php.
pocketmine\MemoryManager::isLowMemory | ( | ) |
Definition at line 158 of file MemoryManager.php.
pocketmine\MemoryManager::trigger | ( | int | $memory, |
int | $limit, | ||
bool | $global = false, | ||
int | $triggerCount = 0 ) |
Triggers garbage collection and cache cleanup to try and free memory.
Definition at line 180 of file MemoryManager.php.
References pocketmine\server().
pocketmine\MemoryManager::triggerGarbageCollector | ( | ) |
Definition at line 247 of file MemoryManager.php.