Index: default-constants.php
===================================================================
--- default-constants.php	(revision 23965)
+++ default-constants.php	(working copy)
@@ -41,7 +41,13 @@
 	// set memory limits.
 	if ( function_exists( 'memory_get_usage' ) ) {
 		$current_limit = @ini_get( 'memory_limit' );
-		if ( -1 != $current_limit && ( -1 == WP_MEMORY_LIMIT || ( intval( $current_limit ) < abs( intval( WP_MEMORY_LIMIT ) ) ) ) )
+		$current_limit_int = intval( $current_limit );
+		if( stripos( $current_limit, 'G' ) !== false ) {
+			$current_limit_int *= 1024;
+		} elseif( stripos( $current_limit, 'T' ) !== false ) {
+			$current_limit_int *= (1024*1024);
+		}
+		if ( -1 != $current_limit && ( -1 == WP_MEMORY_LIMIT || ( $current_limit_int < abs( intval( WP_MEMORY_LIMIT ) ) ) ) )
 			@ini_set( 'memory_limit', WP_MEMORY_LIMIT );
 	}
 
