[gdal-dev] GDALRasterBand::RasterIO and FlushCache

David Strip gdal at stripfamily.net
Sat Jun 1 20:06:40 PDT 2013


On 5/31/2013 5:38 PM, Frank Warmerdam wrote:
> Note that the image cache will start discarding blocks on it's own 
> when it is full.  I think the default cache is about 64MB.    I don't 
> think that flushing the cache should be part of normal applications 
> operations, though if you are very tight on memory you might want to 
> alter the default size.  Note that the cached blocks are discarded 
> when the dataset is closed.

Thanks - I didn't realize this as happening. My memory usage appeared to 
be growing, but I didn't look that closely.  A little experimentation 
showed that max_cache = 40960K (at least in my build, which is pretty 
much a default setup), and indeed once max cache is reached there is no 
growth in the memory usage.

David



More information about the gdal-dev mailing list