mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-14 17:59:41 +00:00
Fixed server crash on startup on 32-bit with memory limit set >= 4096MB
This commit is contained in:
parent
86f3b257a7
commit
caced595d2
@ -89,6 +89,11 @@ class MemoryManager{
|
|||||||
|
|
||||||
$hardLimit = ((int) $this->server->getProperty("memory.main-hard-limit", $defaultMemory));
|
$hardLimit = ((int) $this->server->getProperty("memory.main-hard-limit", $defaultMemory));
|
||||||
|
|
||||||
|
if(PHP_INT_SIZE === 4 and $hardLimit >= 4096){
|
||||||
|
$this->server->getLogger()->warning("Cannot set memory limit higher than 4GB on 32-bit, defaulting to max 4095MB");
|
||||||
|
$hardLimit = 4095;
|
||||||
|
}
|
||||||
|
|
||||||
if($hardLimit <= 0){
|
if($hardLimit <= 0){
|
||||||
ini_set("memory_limit", -1);
|
ini_set("memory_limit", -1);
|
||||||
}else{
|
}else{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user