diff system/System.cpp @ 1405:91231350ee22

Change where the 32-bit memory calculation adjustment is carried out -- more transparent here
author Chris Cannam
date Tue, 07 Mar 2017 13:27:53 +0000
parents cc62d7862203
children c7e68755c7ec
line wrap: on
line diff
--- a/system/System.cpp	Tue Mar 07 13:27:31 2017 +0000
+++ b/system/System.cpp	Tue Mar 07 13:27:53 2017 +0000
@@ -181,24 +181,6 @@
     if (size > INT_MAX) size = INT_MAX;
     total = ssize_t(size);
 
-    // In 32-bit addressing mode we can't address more than 4Gb.
-    // If the total memory is reported as more than 4Gb, we should
-    // reduce the available amount by the difference between 4Gb
-    // and the total. This won't give us an accurate idea of the
-    // amount of memory available any more, but it should be enough
-    // to prevent us from trying to allocate more for our own use
-    // than can be addressed at all!
-    if (sizeof(void *) < 8) {
-        if (total > 4096) {
-            ssize_t excess = total - 4096;
-            if (available > excess) {
-                available -= excess;
-            } else {
-                available = 0;
-            }
-        }
-    }
-
     return;
 
 #else