<div dir="ltr">Hi Markus,<br><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 23, 2014 at 5:43 AM,  <span dir="ltr"><<a href="mailto:svn_grass@osgeo.org" target="_blank">svn_grass@osgeo.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Author: neteler<br>
Date: 2014-07-23 02:43:05 -0700 (Wed, 23 Jul 2014)<br>
New Revision: 61363<br>
<br>
Modified:<br>
   grass/branches/releasebranch_7_0/raster/r.in.gdal/main.c<br>
Log:<br>
r.in.gdal: GDALGetCacheMax() is limited to 2GiB, define valid range for memory parameter<br>
<br>
Modified: grass/branches/releasebranch_7_0/raster/r.in.gdal/main.c<br>
===================================================================<br>
--- grass/branches/releasebranch_7_0/raster/r.in.gdal/main.c    2014-07-23 09:33:12 UTC (rev 61362)<br>
+++ grass/branches/releasebranch_7_0/raster/r.in.gdal/main.c    2014-07-23 09:43:05 UTC (rev 61363)<br>
@@ -101,6 +101,7 @@<br>
     parm.memory->key = "memory";<br>
     parm.memory->type = TYPE_INTEGER;<br>
     parm.memory->required = NO;<br>
+    parm.memory->options = "0-2047";<br>
     parm.memory->description = _("Cache size (MiB)");<br></blockquote><div><br>Any idea why 0-2047? r61362 message doesn't explain and in fact is related to r61364. Shouldn't options be changed to something like 1-, 0- or nothing? No reason to have upper limit, or is there some?<br><br></div><div>Thanks,<br></div><div>Vaclav<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
     parm.target = G_define_option();<br>
@@ -206,6 +207,7 @@<br>
     GDALAllRegister();<br>
     /* default GDAL memory cache size appears to be only 40 MiB, slowing down r.in.gdal */<br>
     if (parm.memory->answer && *parm.memory->answer) {<br>
+          /* TODO: GDALGetCacheMax() overflows at 2GiB, implement use of GDALSetCacheMax64() */<br>
            GDALSetCacheMax(atol(parm.memory->answer) * 1024 * 1024);<br>
            G_verbose_message(_("Using user memory cache size: %.1f MiB"), GDALGetCacheMax()/1024.0/1024.0);<br>
     } else<br>
<br>
_______________________________________________<br>
grass-commit mailing list<br>
<a href="mailto:grass-commit@lists.osgeo.org">grass-commit@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-commit" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-commit</a><br>
</blockquote></div><br></div></div></div>