<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
Thanks Mark, and others.<br><br>I found a pc with a bit more ram, reduced the region to the dtm and it was fine.<br><br>Cheers,<br>Michael<br><br>&gt; Date: Wed, 13 Apr 2011 16:12:22 +0200<br>&gt; Subject: Re: [GRASS-user] r.watershed G_malloc error<br>&gt; From: markus.metz.giswork@googlemail.com<br>&gt; To: michael_spencer@live.co.uk<br>&gt; CC: grass-user@lists.osgeo.org<br>&gt; <br>&gt; On Wed, Apr 13, 2011 at 3:37 PM, Michael Spencer<br>&gt; &lt;michael_spencer@live.co.uk&gt; wrote:<br>&gt; &gt; Hi All,<br>&gt; &gt;<br>&gt; &gt; I'm on windows xp using GRASS 6.4 and 7 and I'm getting the following error<br>&gt; &gt; running r.watershed:<br>&gt; &gt;<br>&gt; &gt; ERROR: G_malloc: unable to allocate 2521456396 bytes of memory at<br>&gt; &gt; init_vars.c:137<br>&gt; &gt;<br>&gt; &gt; I've 2Gb of ram and the dtm I'm using is 185Mb in (pre import) ascii grid<br>&gt; &gt; format, so not massive. Is the above error because I'm short on ram for the<br>&gt; &gt; above process, or is it something else?<br>&gt; &gt;<br>&gt; <br>&gt; 1. make sure the current region settings are ok, i.e. not extending<br>&gt; beyond the extents of the dtm and aligned to the dtm (g.region<br>&gt; align=dtm)<br>&gt; <br>&gt; 2. use the disk swap mode with r.watershed -m<br>&gt; <br>&gt; Markus M<br>                                               </body>
</html>