From 5581bb67f87b3f509f396454a2a86d10f97a64a7 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Sat, 8 Aug 2015 18:15:14 +0200 Subject: [PATCH] respect --osm2pgsql-cache setting fixes #260 --- utils/setup.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/utils/setup.php b/utils/setup.php index 3fad6fe8..14fe675e 100755 --- a/utils/setup.php +++ b/utils/setup.php @@ -78,11 +78,13 @@ } // Assume we can steal all the cache memory in the box (unless told otherwise) - $iCacheMemory = (isset($aCMDResult['osm2pgsql-cache'])?$aCMDResult['osm2pgsql-cache']:getCacheMemoryMB()); - if ($iCacheMemory > getTotalMemoryMB()) + if (isset($aCMDResult['osm2pgsql-cache'])) + { + $iCacheMemory = $aCMDResult['osm2pgsql-cache']; + } + else { $iCacheMemory = getCacheMemoryMB(); - echo "WARNING: resetting cache memory to $iCacheMemory\n"; } $aDSNInfo = DB::parseDSN(CONST_Database_DSN); -- 2.39.5