[GRASS-SVN] r69777 - grass/trunk/raster/r.stats.quantile
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Nov 5 15:37:48 PDT 2016
Author: mmetz
Date: 2016-11-05 15:37:48 -0700 (Sat, 05 Nov 2016)
New Revision: 69777
Modified:
grass/trunk/raster/r.stats.quantile/main.c
Log:
r.stats.quantile: reduce memory consumption
Modified: grass/trunk/raster/r.stats.quantile/main.c
===================================================================
--- grass/trunk/raster/r.stats.quantile/main.c 2016-11-05 21:24:41 UTC (rev 69776)
+++ grass/trunk/raster/r.stats.quantile/main.c 2016-11-05 22:37:48 UTC (rev 69777)
@@ -132,7 +132,7 @@
continue;
bc->num_slots = 1;
- if (bc->total * sizeof(DCELL) > num_slots * sizeof(struct bin))
+ if (bc->total * 10 > (unsigned long) num_slots)
bc->num_slots = num_slots;
bc->slots = G_calloc(bc->num_slots, sizeof(unsigned int));
More information about the grass-commit
mailing list