Table of Contents

Namespace VpnHood.Net.Toolkit.Memory

Classes

VhMemory

Ambient context for reading memory figures (see VhMemoryInfo) — including the process footprint an OS memory limit is enforced against (e.g. iOS jetsam's phys_footprint). .NET has no single cross-platform API for these, so each host installs a platform implementation once at init by assigning Instance (mirrors how VhLogger.Instance is set). Whatever a platform can't measure it returns as null. Consumers read via VhMemory.Instance without any dependency on a specific host; this type lives in Toolkit because every assembly already references it.

Instance defaults to a null-object that reports nothing, so callers never need a null check.

VhTypeTracker

Provides a process-wide tracker of objects and events for memory investigations: it counts, by name, the objects it was given that are still alive, and counts named events.

Structs

VhMemoryInfo

Cross-platform snapshot of process/system memory figures. Every field is nullable on purpose: no single OS exposes all of them, so each host fills what it can measure and leaves the rest null. Bytes are the canonical unit; the *Mb helpers are convenience conversions.