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

Benjamin Welton benjamin.r.welton at wmich.edu
Wed Jun 8 15:34:19 EDT 2011


Hey Matt,

     If i remember correctly osgeo4w is 32bit (its been a while since iv 
looked at the osgeo4w binaries however so i may be incorrect). If they 
are 32bit and you are setting -wm to 2048 (2GB) you might be having 
memory limitation issues (which i believe 2GB virtual memory for x86 
executables on windows).

Ben



On 06/08/2011 02:05 PM, Matt Wilkie wrote:
> 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.
>
>
>
>
>



More information about the gdal-dev mailing list