[Gdal-dev] GDALGetCacheUsed() always returns 0
Frank Warmerdam
warmerdam at pobox.com
Thu Jun 14 11:50:05 EDT 2007
Dmitry Kan wrote:
>
> Hello list!
>
> I just came across small issue relating to caching in GDAL. I use
> GDALGetCacheMax() to vary the cache limit and it seems to be working
> fine. But when I request the amount of bytes used via GDALGetCacheUsed()
> after the whole process I always get 0 bytes. Could anyone please
> explain me why does this take place?
Dmitry,
This function returns the amount of cache bytes *currently* in use. When
you close the files all cached blocks are released. So if you want an
approximation of the maximum amount of cache used then call the
function before closing anything.
If you want to track a true highwater mark then the code would have to be
changed.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | President OSGeo, http://osgeo.org
More information about the Gdal-dev
mailing list