I’m getting ‘G_malloc’ errors when using large images in Grass 6.4.3rc1. I need to use much larger images than the one causing the error. Is there a way around this problem? i have 3gb of RAM on this PC (standard MS Windows installer not osgeo). Is this enough RAM or should i invest in much more… or is there another cause of this?.
Error message:
Current region rows: 19998, cols: 15999
ERROR: G_malloc: unable to allocate 1279792008 bytes of memory at gsds.c:575
If you want GRASS to use more than 3.5GB of RAM,
then you need to run a 64 bit operating system.
Otherwise, no single application will get to see
more than 4GB. Also check your motherboard's manual
to see how much RAM it supports. Often, there are
limits of 16, 32 or 64GB total.
If you plan to use 64 bit Windows, then be aware
that Microsoft has put arbitrary limitations re.
usable RAM into each one of there many different
release versions. E.g. a Windows Home license might
not be able to use more than 8GB.
Ben
On 10/29/2012 02:19 PM, Paul Shapley wrote:
Hi Users,
I'm getting 'G_malloc' errors when using large images in Grass 6.4.3rc1.
I need to use much larger images than the one causing the error. Is
there a way around this problem? i have 3gb of RAM on this PC (standard
MS Windows installer not osgeo). Is this enough RAM or should i invest
in much more... or is there another cause of this?.
Error message:
Current region rows: 19998, cols: 15999
ERROR: G_malloc: unable to allocate 1279792008 bytes of memory at gsds.c:575
--
Paul J. Shapley
If you want GRASS to use more than 3.5GB of RAM,
then you need to run a 64 bit operating system.
Otherwise, no single application will get to see
more than 4GB. Also check your motherboard's manual
to see how much RAM it supports. Often, there are
limits of 16, 32 or 64GB total.
If you plan to use 64 bit Windows, then be aware
that Microsoft has put arbitrary limitations re.
usable RAM into each one of there many different
release versions. E.g. a Windows Home license might
not be able to use more than 8GB.
Also, we don't currently provide 64-bit GRASS binaries for Windows, so
you'd need to build it from source with a compiler that can produce
64-bit executables (and you'll need 64-bit versions of all of the
relevant libraries).
The last time I checked, MingGW-64 was still quite unstable, although
I don't know if that has changed since. The build system doesn't
support compiling with MSVC (and the free edition doesn't support
building 64-bit binaries).
Also, we don't currently provide 64-bit GRASS binaries for Windows, so
you'd need to build it from source with a compiler that can produce
64-bit executables (and you'll need 64-bit versions of all of the
relevant libraries).
The last time I checked, MingGW-64 was still quite unstable, although
I don't know if that has changed since. The build system doesn't
support compiling with MSVC (and the free edition doesn't support
building 64-bit binaries).
True. And it's a beast to install and to get all the libs and
header files into place. However, the situation is improving
continuously. I have documented my efforts (trying to compile
a GRASS 6.4.3 distro with minimal dependencies for use via
SEXTANTE in gvSIG) here:
However, I am not sure it's worth the trouble: MS change their
free MSVC policies and front-ends all the time. It seems a safer
bet to me that MingGW-64 will mature soon enough.
Cheers,
Ben
--
Benjamin Ducke
{*} Geospatial Consultant
{*} GIS Developer
On Mon, Oct 29, 2012 at 8:03 PM, Benjamin Ducke <benducke@fastmail.fm> wrote:
On 10/29/2012 06:27 PM, Glynn Clements wrote:
[snip]
Also, we don't currently provide 64-bit GRASS binaries for Windows, so
you'd need to build it from source with a compiler that can produce
64-bit executables (and you'll need 64-bit versions of all of the
relevant libraries).
The last time I checked, MingGW-64 was still quite unstable, although
I don't know if that has changed since. The build system doesn't
support compiling with MSVC (and the free edition doesn't support
building 64-bit binaries).
True. And it's a beast to install and to get all the libs and
header files into place. However, the situation is improving
continuously. I have documented my efforts (trying to compile
a GRASS 6.4.3 distro with minimal dependencies for use via
SEXTANTE in gvSIG) here:
It's incomplete (I have not been successful at compiling a complete
64 bit binary set on Windows so far), but maybe it will be of some use.
This would not help for the reported problem:
ERROR: G_malloc: unable to allocate 1279792008 bytes of memory at gsds.c:575
because the function where this error occurs, gsds_alloc_typbuff() in
lib/ogsf/gsds.c can only allocate a maximum of 2 GB in GRASS 6. This
has been fixed in GRASS 7, but only if GRASS 7 is compiled with 64-bit
support.
As a workaround, I would suggest to change the resolution of the
current region before using any 3D functionality. I guess you tried
nviz or wxnviz where an image size of 19998x15999 is most probably by
far exceeding the size of the display.