[gdal-dev] In Memory Raster - allocation run out of memory on big sizes.

Daniele Romagnoli dany.geotools at gmail.com
Fri Jan 4 07:49:54 EST 2008


Hi list,
I'm trying to build a very big In Memory Raster Dataset (~1 GB) using SWIG's
Java Bindings on my Notebook (with Windows Vista, with 2GB ram)

When calling the java method memoryDriver.create(...) the following error
appears "ERROR 2: Unable to create band arrays ... out of memory" which is
thrown when the underlying calloc method can't successfully allocate memory.

I have performed some tests and tunings with the following conclusions:
- reducing the JVM Heap Size (using -Xmx command) allows to allocate a
bigger native memory portion (using -Xmx1024M allows me to allocate only
<550 MB memory while using -Xmx16M allows me to allocate up to ~820MB) [Java
Heap space and "Native" Heap space are managed separately]
- increasing the virtual memory, the result is the same (out of memory).
- killing all unuseful processes -> freeing more physical memory (~1.2 GB),
the result is the same (out of memory))
Any setting allows me to allocate a max of ~840000 KBytes.

Anyway, why having almost 1.2 GB free physical memory and a 3GB virtual
memory setting (with ~2GB free) allows me only to create always ~840000
KBytes?
Does anyone know how memory is managed, how the calloc method operates and
whether an OS limitation exist?
Thank you very much.

Best Regards,
Daniele R.

PS: anyway, I will try avoid In Memory Raster use in case of very Big
datasets.

-- 
-------------------------------------------------------
Eng. Daniele Romagnoli
Software Engineer

GeoSolutions S.A.S.
Via Carignoni 51
55041 Camaiore (LU)
Italy

phone: +39 0584983027
fax:     +39 0584983027
mob:   +39 328 0559267


http://www.geo-solutions.it

-------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20080104/047b65e3/attachment.html


More information about the gdal-dev mailing list