ERROR G_calloc

charnotw charnotw at helios.aston.ac.uk
Thu May 9 08:00:00 EDT 1996



> On 8 May 1996, Anne Smith wrote:
> 
> > I have just installed grass on an alpha workstation.  The
> > d.rast, d.vect., r.mapcalc, r.le.setup work fine but when I went
> > to r.mask after selecting my raster to use as a mask I get the
> > following error:
> > ERROR G_calloc: out of memory
> Hi,
> Are you talking about the floating point version of Grass or the normal 
> 4.1.5 version! I have similar problems on our silicon machines since I 
> installed the fp_version. I posted already several times a message about 
> it and never received a satisfying answer! Does the problem also occurs 
> in r.reclass? Any case I am still working to get an idea what happens! As 
> I am not really a good C-programmer it may need some time, so I hope you 
> got some reply! In case you should receive some news about it. Please let 
> me know!
> 


The "G_calloc: out of memory" Is just what it
sayes.  The operating system is unable to give the
program all the memory (ie RAM) it has requested, with the 
G_calloc function. Whenever I get this I first try 
shutting down anything else that is running 
(netscape xv etc) usually that does the trick.  
If that fails changing to a coarser or smaller region 
might do it,  (some programs like r.watershed which use 
huge amounts of memory have a low (and slow) memory mode.

These problems are likely to be more acute using the
floating point version of GRASS because doubles are
bigger than integers. So the G_calloc problem is 
likely to occur more often.

As I understand r.mask, it just puts a raster in your
mapset called MASK which marks areas to be mask off
so I suppose you could use r.mapcalc or r.reclass, (I
haven't tried this!) 

BTW out of curiosity does anyone know why the GRASS
developers felt the need to reimplement there own
version of calloc (and malloc, strcat etc)

> 
> Hi, sorry if this is a dumb question but....what is the "floating point 
> version" of grass? 
> 
> ------------------------------------------------------------------------
> | Harini Nagendra               E-MAIL : harini at ces.iisc.ernet.in      |
 
The floating point version of grass just GRASS with new floating point
(ie decimal) capibilites added (and at long last a NULL value that is 
different from 0).  To update GRASS you must get fp_main.tar and fp_alpha.tar
and the readme from moon.cecer.army.mil /incoming and recompile
GRASS (check fp.readme(?) for the procedure)
I haven't had any problems with it apart from lack of documentation!


cheers   Tom

Tom Charnock                       O--O
Dept Civil Engineering            (~~~~)
Aston University                 (  __  )
Birmingham B4 7ET UK             /|\  /|\
charnotw at sun.aston.ac.uk
 





More information about the grass-user mailing list