[GRASS-SVN] r47648 - grass/branches/develbranch_6/raster/r.terraflow
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Aug 15 12:14:07 EDT 2011
Author: neteler
Date: 2011-08-15 09:14:07 -0700 (Mon, 15 Aug 2011)
New Revision: 47648
Modified:
grass/branches/develbranch_6/raster/r.terraflow/main.cc
Log:
glynn: Fix handling of memory size (conversion of int to size_t) (from trunk, r47641)
Modified: grass/branches/develbranch_6/raster/r.terraflow/main.cc
===================================================================
--- grass/branches/develbranch_6/raster/r.terraflow/main.cc 2011-08-15 16:13:17 UTC (rev 47647)
+++ grass/branches/develbranch_6/raster/r.terraflow/main.cc 2011-08-15 16:14:07 UTC (rev 47648)
@@ -339,7 +339,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);
@@ -529,7 +529,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