function drush_memory_limit

8.0.x drush.inc drush_memory_limit()
6.x drush.inc drush_memory_limit()
7.x drush.inc drush_memory_limit()
3.x drush.inc drush_memory_limit()
4.x drush.inc drush_memory_limit()
5.x drush.inc drush_memory_limit()
master drush.inc drush_memory_limit()

Get the PHP memory_limit value in bytes.

3 calls to drush_memory_limit()
_drush_batch_worker in commands/core/drupal/batch_6.inc
Process batch operations
_drush_batch_worker in commands/core/drupal/batch.inc
Process batch operations
_drush_postmortem in includes/environment.inc
Evalute the environment after an abnormal termination and see if we can determine any configuration settings that the user might want to adjust.

File

includes/drush.inc, line 1639
The drush API implementation and helpers.

Code

function drush_memory_limit() {
  $value = trim(ini_get('memory_limit'));
  $last = strtolower($value[strlen($value) -1]);
  switch ($last) {
    case 'g':
      $value *= DRUSH_KILOBYTE;
    case 'm':
      $value *= DRUSH_KILOBYTE;
    case 'k':
      $value *= DRUSH_KILOBYTE;
  }

  return $value;
}