[GRASS-SVN] r73280 - grass/branches/releasebranch_7_4/imagery/i.segment
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Sep 7 00:51:24 PDT 2018
Author: mmetz
Date: 2018-09-07 00:51:24 -0700 (Fri, 07 Sep 2018)
New Revision: 73280
Modified:
grass/branches/releasebranch_7_4/imagery/i.segment/open_files.c
Log:
i.segment: fix memory management estimation (backport trunk r73278)
Modified: grass/branches/releasebranch_7_4/imagery/i.segment/open_files.c
===================================================================
--- grass/branches/releasebranch_7_4/imagery/i.segment/open_files.c 2018-09-07 07:51:09 UTC (rev 73279)
+++ grass/branches/releasebranch_7_4/imagery/i.segment/open_files.c 2018-09-07 07:51:24 UTC (rev 73280)
@@ -541,6 +541,8 @@
/* calculate number of region stats that can be kept in memory */
reg_size_count = (globals->mb - segs_mb) / reg_size_mb;
+ if (reg_size_count < 1)
+ reg_size_count = 1;
globals->min_reg_size = 3;
if (reg_size_count < (double) globals->notnullcells / globals->min_reg_size) {
globals->min_reg_size = (double) globals->notnullcells / reg_size_count;
More information about the grass-commit
mailing list