using NetVips.Internal; namespace NetVips; /// /// A class that provides the statistics of memory usage and opened files. /// /// /// libvips watches the total amount of live tracked memory and /// uses this information to decide when to trim caches. /// public static class Stats { /// /// Get the number of active allocations. /// public static int Allocations => Vips.TrackedGetAllocs(); /// /// Get the number of bytes currently allocated `vips_malloc()` and friends. /// /// /// libvips uses this figure to decide when to start dropping cache. /// public static int Mem => Vips.TrackedGetMem(); /// /// Returns the largest number of bytes simultaneously allocated via vips_tracked_malloc(). /// /// /// Handy for estimating max memory requirements for a program. /// public static ulong MemHighwater => Vips.TrackedGetMemHighwater(); /// /// Get the number of open files. /// public static int Files => Vips.TrackedGetFiles(); }