On Mittwoch, 18. September 2024 21:23:11 MESZ Larry Gritz via Tiff wrote:
> I noticed the relatively recent (in the grand scheme of things) addition of
> TIFFOpenOptionsSetMaxSingleMemAlloc and
> TIFFOpenOptionsSetMaxCumulatedMemAlloc to limit the allocations for a
> particular handle.
> 
> Is there any way to query libtiff about how much total memory it is
> currently holding for the internal data structures of a single open TIFF
> handle? It seems like this must already be tracked internally for the
> SetMax functions to be effective, but as far as I can see, there is no way
> to query it.
> 
> That would be really handy in situations where an application that may have
> many files open seems to be using a lot of memory, and we'd want to try to
> figure out if that memory is held by libtiff, and if so, which files seem
> to be the ones with a large footprint.

While I agree that forwarding more information might be useful, I would like 
to point out that your question might also be answered in a more library-
agnostic fashion via generic memory profiling. Tools like xperf/WPA/UIforETW 
Windows would even allow you to correlate between memory allocations and file 
accesses. On linux, a tool like heaptrack would at least show you how much 
memory got allocated via libtiff functions, but you won't be easily seeing how 
that maps to an individual file.

Cheers

-- 
Milian Wolff | [email protected] | Senior Software Engineer
KDAB (Deutschland) GmbH, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt, C++ and OpenGL Experts

_______________________________________________
Tiff mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/tiff

Reply via email to