mirror of
https://github.com/php/php-src.git
synced 2024-11-27 11:53:33 +08:00
Add memory check to the test
This commit is contained in:
parent
a2cb8228fe
commit
222fa032d2
@ -45,6 +45,13 @@ elseif (PHP_OS == 'FreeBSD') {
|
||||
if ($freeMemory < 2100*1024*1024) {
|
||||
die('skip Not enough memory.');
|
||||
}
|
||||
} elseif (PHP_OS == "WINNT") {
|
||||
$s = trim(shell_exec("wmic OS get FreeVirtualMemory /Value 2>nil"));
|
||||
$freeMemory = explode('=', $s)[1]*1;
|
||||
|
||||
if ($freeMemory < 2.1*1024*1024) {
|
||||
die('skip Not enough memory.');
|
||||
}
|
||||
}
|
||||
?>
|
||||
--INI--
|
||||
|
Loading…
Reference in New Issue
Block a user