1
0
Fork 0

Increase memory to 512M, remove warning

pull/1025/head
Kirill chEbba Chebunin 2012-08-24 17:49:35 +04:00
parent ba45ef2b70
commit 21596b2ccd
2 changed files with 4 additions and 5 deletions

View File

@ -24,10 +24,9 @@ $memoryInBytes = function ($value) {
}; };
$memoryLimit = trim(ini_get('memory_limit')); $memoryLimit = trim(ini_get('memory_limit'));
// Increase memory_limit if it is lower than 256M // Increase memory_limit if it is lower than 512M
if ($memoryLimit != -1 && $memoryInBytes($memoryLimit) < 256 * 1024 * 1024) { if ($memoryLimit != -1 && $memoryInBytes($memoryLimit) < 512 * 1024 * 1024) {
@ini_set('memory_limit', '256M'); @ini_set('memory_limit', '512M');
printf('Warning: memory_limit was increased from %s to %s' . PHP_EOL . PHP_EOL, $memoryLimit, '256M');
} }
unset($memoryInBytes); unset($memoryInBytes);

View File

@ -9,7 +9,7 @@ If composer shows memory errors on some commands:
The `memory_limit` ini value should be increased. The `memory_limit` ini value should be increased.
> **Note:** Composer internaly increases the memory_limit to 256M. > **Note:** Composer internaly increases the memory_limit to 512M.
> It is a good idea to create an issue for composer if you get memory errors. > It is a good idea to create an issue for composer if you get memory errors.
Get current value: Get current value: