Index: includes/module.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/module.inc,v
retrieving revision 1.133
diff -u -p -r1.133 module.inc
--- includes/module.inc 11 Nov 2008 22:39:58 -0000  1.133
+++ includes/module.inc 15 Nov 2008 16:29:45 -0000
@@ -106,6 +106,7 @@ function module_rebuild_cache() {
     'package' => 'Other',
     'version' => NULL,
     'php' => DRUPAL_MINIMUM_PHP,
+    'memory_requirement' => DRUPAL_MINIMUM_PHP_MEMORY_LIMIT,
     'files' => array(),
   );

Index: modules/system/system.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.admin.inc,v
retrieving revision 1.104
diff -u -p -r1.104 system.admin.inc
--- modules/system/system.admin.inc 11 Nov 2008 22:39:59 -0000  1.104
+++ modules/system/system.admin.inc 15 Nov 2008 16:29:46 -0000
@@ -758,6 +758,13 @@ function _system_modules_build_row($info
     $status_long .= t('This module requires PHP version @php_required and is incompatible with PHP version !php_version.', array('@php_required' => $php_required, '!php_version' => phpversion()));
   }

+  // Check if the required amount of memory is available.
+  if (parse_size(ini_get('memory_limit')) < parse_size($info['memory_requirement'])) {
+    $compatible = FALSE;
+    $status_short .= t('Not enough memory available for this module');
+    $status_long .= t('This module requires the PHP memory limit be set to %memory_required or greater. For more information on how to change the PHP memory limit see the <a href="@handbook_url">online handbook</a>.', array('%memory_required' => $info['memory_requirement'], '@handbook_url' => 'http://drupal.org/node/207036'));
+  }
+
   // If this module is compatible, present a checkbox indicating
   // this module may be installed. Otherwise, show a big red X.
   if ($compatible) {
