export COMPOSER_MEMORY_LIMIT=-1
ini_set('memory_limit', '1024M'); // 1GB
// OR
ini_set('memory_limit', '-1'); // unlimited memory (may cause a memory leak)
ini_set('memory_limit', '-1');
//Allowed memory size of 134217728 bytes exhausted (tried to allocate 65015808 bytes)
<?php
ini_set('memory_limit', '1024M');
?>
Or
set in php.ini
memory_limit = -1
php -d memory_limit=-1 /usr/local/bin/composer install
set COMPOSER_MEMORY_LIMIT=-1
memory_limit = 64M;
;memory_limit=512M
ini_set('memory_limit', '44M');