#2036: Failed watershed analysis on Grass --------------------------+------------------------------------------------- Reporter: mehmeto | Owner: grass-dev@… Type: defect | Status: closed Priority: normal | Milestone: 6.4.4 Component: Raster | Version: 6.4.2 Resolution: fixed | Keywords: LFS, r.watershed Platform: MSWindows 7 | Cpu: x86-64 --------------------------+-------------------------------------------------
Comment(by glynn): Replying to [comment:7 hamish]: > > ERROR: G_calloc: unable to allocate 4 * 60175190 bytes at main.c:91 > > (devs: should we strip the wingrass binaries in the stable release builds? or keep the line number code there for better debugging?) Stripping just removes debug symbols; it won't affect the error message, which relies upon the G_calloc() etc macros passing `__FILE__` and `__LINE__` to the underlying function. > > If you calculate 4 * 60175190 bytes = 240700760 which is > 2^31. > > missed a 0, actually it's 9 times smaller than 2^31. It only wants to allocate 241mb RAM That's the allocation that fails. But main() allocates 2 such arrays, and before that it calls init_vars(), which allocates 2 or 3 CELL arrays and between 1 and 4 DCELL arrays. So the actual requirements are N*241 MB where N is between 6 and 13. The upper bound comes out at over 3 GB. And that's only the allocations which use size_array(). -- Ticket URL: <http://trac.osgeo.org/grass/ticket/2036#comment:9> GRASS GIS <http://grass.osgeo.org> _______________________________________________ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev