[GRASS-user] r.watershed G_malloc error

Hamish hamish_b at yahoo.com
Wed Apr 13 10:47:06 EDT 2011


Michael Spencer wrote:
> I'm on windows xp using GRASS 6.4 and 7 and I'm getting the
> following error running r.watershed:
>
> ERROR: G_malloc: unable to allocate 2521456396 bytes of memory
> at init_vars.c:137
>
> I've 2Gb of ram and the dtm I'm using is 185Mb in (pre import)
> ascii grid format, so not massive. Is the above error because
> I'm short on ram for the above process, or is it something else?

2521456396 / 1024000 = 2462.4 mb RAM req'd. XP gobbles about
270mb in standby (+ virus checkers etc), so you're about a
gigabyte over your limit. Can you work on a smaller region or
coarser resolution? (how many rows x columns? "g.region -p")

-or- you don't need that much more RAM; memory's pretty cheap.


Hamish



More information about the grass-user mailing list