[GRASS-SVN] r47641 - grass/trunk/raster/r.terraflow
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Aug 15 08:41:10 EDT 2011
Author: glynn
Date: 2011-08-15 05:41:10 -0700 (Mon, 15 Aug 2011)
New Revision: 47641
Modified:
grass/trunk/raster/r.terraflow/main.cc
Log:
Fix handling of memory size (conversion of int to size_t)
Modified: grass/trunk/raster/r.terraflow/main.cc
===================================================================
--- grass/trunk/raster/r.terraflow/main.cc 2011-08-15 08:01:49 UTC (rev 47640)
+++ grass/trunk/raster/r.terraflow/main.cc 2011-08-15 12:41:10 UTC (rev 47641)
@@ -319,7 +319,7 @@
sprintf(buf, "D8CUT=%f", opt->d8cut);
stats->comment(buf);
- size_t mm_size = opt->mem << 20; /* (in bytes) */
+ size_t mm_size = (size_t) opt->mem << 20; /* (in bytes) */
char tmp[100];
formatNumber(tmp, mm_size);
sprintf(buf, "Memory size: %s bytes", tmp);
@@ -506,7 +506,7 @@
}
/* set up STREAM memory manager */
- size_t mm_size = opt->mem << 20; /* opt->mem is in MB */
+ size_t mm_size = (size_t) opt->mem << 20; /* opt->mem is in MB */
MM_manager.set_memory_limit(mm_size);
if (opt->verbose) {
MM_manager.warn_memory_limit();
More information about the grass-commit
mailing list