In your php.ini or using ini_set('memory_limit', '128M'); in your config.php.
php.ini
ini_set('memory_limit', '128M');
config.php