Re: [gdal-dev] Memory loss with RasterIO

2011-05-27 Thread Goo Creations
Hey Thanks. I'll try playing around with different block sizes, to reduce fragmentation. On Fri, May 27, 2011 at 12:55 PM, Even Rouault wrote: > You're perhaps running into memory fragmentation issues if your buffer is > too > big. And yes, GDAL maintains internally a block cache whose blocks

Re: [gdal-dev] Memory loss with RasterIO

2011-05-27 Thread Even Rouault
You're perhaps running into memory fragmentation issues if your buffer is too big. And yes, GDAL maintains internally a block cache whose blocks are destroyed when the dataset is closed. But by default (unless you explicitely set it to another value), it is limited to 40 MB. But mixing small alloca

[gdal-dev] Memory loss with RasterIO

2011-05-27 Thread Goo Creations
Hi all, I've come across some weird memory loss: *uint *data = new uint[region->width*region->height]; int x = 0, y = 0; dataset->GetRasterBand(band)->RasterIO(GF_Read, x, y, width, height, data, width, height, GDT_UInt32, 0, 0); delete [] data; * This code is executed a few thousand times with d