}
// 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);