[GRASS-dev] Improving the G_calloc: unable to allocate xx bytes of memory message?
neteler at osgeo.org
Fri Oct 24 07:07:37 PDT 2014
(related to a question on grass-user)
On Fri, Oct 24, 2014 at 3:27 PM, Andrea Timmermann wrote:
> When running:
> r.basin map=map at Elevation prefix=o coordinates=-71.10394196,43.9865230801
> threshold=19005 dir=C:\\Users\\Andrea\\Basins
> I get:
> " ....
> v.to.rast complete.
> All in RAM calculation...
> Reading raster map <o_map_drainage_e>...
> Calculating basins using vector point map...
> Current region rows: 21612, cols: 21612
> ERROR: G_calloc: unable to allocate 21612 * 4 bytes of memory at io.c:41
Question: is there a way to also communicate in which *command* the
memory allocation occurred, i.e. improve the error message?
We have 9 files called "io.c" in GRASS 7.
Ideal would be something like:
ERROR: G_calloc: unable to allocate 21612 * 4 bytes of memory at r.thin/io.c:41
ERROR: r.thin: G_calloc: unable to allocate 21612 * 4 bytes of memory
Not sure how to implement that in lib/gis/alloc.c
More information about the grass-dev