You are here

function _migrate_memory_limit in Migrate 6

Get the PHP memory_limit value in bytes

4 calls to _migrate_memory_limit()
drush_migrate_wipe in ./migrate.drush.inc
A drush command callback.
migrate_content_process_clear in ./migrate.module
Clear migrated objects from the specified content set
migrate_content_process_import in ./migrate.module
Import objects from the specified content set
_migrate_settings_form in ./migrate_pages.inc
Form definition for settings page.

File

./migrate.module, line 1527
This module provides tools at "administer >> content >> migrate" for analyzing data from various sources and importing them into Drupal tables.

Code

function _migrate_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;
}