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.

2 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_7.inc
Process batch operations

File

includes/drush.inc, line 1781
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 *= 1024;
    case 'm':
      $value *= 1024;
    case 'k':
      $value *= 1024;
  }

  return $value;
}