[GRASS-dev] R.terraflow on massive grids
Glynn Clements
glynn at gclements.plus.com
Tue Aug 16 03:15:28 EDT 2011
Doug_Newcomb at fws.gov wrote:
> Should the limit to memory be indicated in the gui?
> Would there be any benefit to other parts of GRASS in bumping up this
> memory limit? I can see the reason on 32 bit windows XP, but that is
> starting to go away.
Arbitrary 32-bit limits should ideally be fixed, but it's a game of
Whac-a-Mole. The problem usually arises as a result of using "int"
instead of long, size_t, off_t, etc.
I've fixed the original issue and one other with r47665:
--- raster/r.terraflow/grass2str.h (revision 47663)
+++ raster/r.terraflow/grass2str.h (working copy)
@@ -140,9 +140,9 @@
/* close map files */
Rast_close (infd);
- G_debug(3, "nrows=%d ncols=%d stream_len()=%d", nrows, ncols,
+ G_debug(3, "nrows=%d ncols=%d stream_len()=%"PRI_OFF_T, nrows, ncols,
str->stream_len());
- assert(nrows * ncols == str->stream_len());
+ assert((off_t) nrows * ncols == str->stream_len());
rt_stop(rt);
stats->recordTime("reading raster map", rt);
This might cause problems on non-Linux platforms, but both r.terraflow
and LFS have always had portability issues.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list