Information and control over memory use
I'm trying to get more insight into memory use by GDAL:
- access to https://gdal.org/api/raster_c_api.html#_CPPv416GDALGetCacheUsedv
- closing datasets, would probably require PR?
For things like getting cache usage, I'm wondering if this can or should be done via standard binding?
Hello,
Thanks so much for your interest. I am the author of the code in question (management of datasets), though @pomadchin may wish to chime in, as well. My understanding of the second half of your query is "is it possible for me to forcibly close open GDAL datasets"? It is not possible to do so selectively (to the best of my memory!), but you can use clear to close all of the datasets associated with the gdal-warp-bindings cache, which should in turn release GDAL resources. A more selective approach would indeed need a PR.
:hmm: I think clear is not exposed via Java API 🤔 we could expose it. Dangerously can be used probably.