[gdal-dev] gdalwarp: ERROR 2: Out of memory allocating {number} byte destination buffer.

Matt Wilkie matt.wilkie at gov.yk.ca
Wed Jun 8 15:05:26 EDT 2011


Hi Folks,

Can anyone tell me what this error means and how to work around it?

Win7 x64 command shell
osgeo4w gdal 1.8
13gb ram (~4.7gb free according to Process Explorer)
121gb free on the drive (mapped to network)
20gb free on drive pointed to by %TEMP%

There are 26 input files whose size ranges from 110mb to 260mb, 
totalling 5.5gb(ftp://ftp.geomaticsyukon.ca/DEMs/CDED_50k/)

If I up GDAL_CACHEMAX and -wm to higher value, like 2048, I get the 
error on every single input file instead of just some (I'm still waiting 
for the results of not using those options at all).

-----
*gdalinfo --version
*GDAL 1.8.0, released 2011/01/12*

set .gdopt=*--config GDAL_CACHEMAX 500 -wm 500 --config bigtiff if_safer 
-multi
*set .input=*..\dem_105E.tif ..\dem_105L.tif ..\dem_105M.tif 
..\dem_105N.tif ..\dem_106C.tif ..\dem_106D.tif ..\dem_106E.tif 
..\dem_106L.tif ..\dem_115F.tif ..\dem_115G.tif ..\dem_115H.tif 
..\dem_115I.tif ..\dem_115J.tif ..\dem_115K.tif ..\dem_115N.tif 
..\dem_115O.tif ..\dem_115P.tif ..\dem_116A.tif ..\dem_116B.tif 
..\dem_116C.tif ..\dem_116F.tif ..\dem_116G.tif ..\dem_116H.tif 
..\dem_116I.tif ..\dem_116J.tif ..\dem_116K.tif

*gdalwarp  %.gdopt% -t_srs EPSG:26907 -r bilinear -tr 30 30 %.input% 
dem.tif*
Creating output file that is 15662P x 23332L.
Processing input file ..\dem_105E.tif.
Using internal nodata values (eg. -3.40282e+038) for image ..\dem_105E.tif.
0...10...20...30...40...50...60...70...80...90...100 - done./
/

    /next 7 inputs processed successfully/

Processing input file ..\dem_115F.tif.
Using internal nodata values (eg. -3.40282e+038) for image ..\dem_115F.tif.
0...10...20...30...40...50ERROR 2: Out of memory allocating 365425784 
byte destination buffer.
...60...70..Processing input file ..\dem_115G.tif.
Using internal nodata values (eg. -3.40282e+038) for image ..\dem_115G.tif.
.80...90...100 - done.
Processing input file ..\dem_115H.tif.

    /Error at 50% on dem_115f.tif, but carries on /
    /then starts a new input, dem_115g.tif, at 70%+/
    /and apparently completes 115f, or is that 115g?/
    /in any case the next tile, dem_115h, is successful: /

Processing input file ..\dem_115H.tif.
Using internal nodata values (eg. -3.40282e+038) for image ..\dem_115H.tif.
0...10...20...30...40...50...60...70...80...90...100 - done.

    /next 2 are successful,
    followed by 13 errors./

Processing input file ..\dem_116J.tif.
Using internal nodata values (eg. -3.40282e+038) for image ..\dem_116J.tif.
ERROR 2: Out of memory allocating 365425784 byte destination buffer.
Processing input file ..\dem_116K.tif.
Using internal nodata values (eg. -3.40282e+038) for image ..\dem_116K.tif.
ERROR 2: Out of memory allocating 365425784 byte destination buffer.





-- 
matt wilkie
--------------------------------------------
Geomatics Analyst
Information Management and Technology
Yukon Department of Environment
10 Burns Road * Whitehorse, Yukon * Y1A 4Y9
867-667-8133 Tel * 867-393-7003 Fax
http://environmentyukon.gov.yk.ca/geomatics/
--------------------------------------------



More information about the gdal-dev mailing list