using System.Runtime.InteropServices; namespace XFESystem.Kernel; /// Allocation-free raw page counts, independent of the managed GC's freed-object count. internal static class NativeRuntimeMemoryDiagnostics { [DllImport("libSystem.Native", EntryPoint = "XfeRuntimeRawFreePageCount")] [SuppressGCTransition] internal static extern ulong FreePages(); [DllImport("libSystem.Native", EntryPoint = "XfeRuntimeRawTotalPageCount")] [SuppressGCTransition] internal static extern ulong TotalPages(); [DllImport("libSystem.Native", EntryPoint = "XfeRuntimeRawLargestFreeRunPages")] [SuppressGCTransition] internal static extern ulong LargestFreeRunPages(); }