[GRASS-user] r.watershed G_malloc error

Markus Metz markus.metz.giswork at googlemail.com
Wed Apr 13 10:12:22 EDT 2011


On Wed, Apr 13, 2011 at 3:37 PM, Michael Spencer
<michael_spencer at live.co.uk> wrote:
> Hi All,
>
> 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?
>

1. make sure the current region settings are ok, i.e. not extending
beyond the extents of the dtm and aligned to the dtm (g.region
align=dtm)

2. use the disk swap mode with r.watershed -m

Markus M


More information about the grass-user mailing list