Vixen
dd8b0a81
csharp
public sealed class MemoryView

Doc 13's four memory arenas, each with its rows.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

The panel is MemoryView.vxml; this file exists only to make it public, for the reason StatisticsView's own part gives — the markup compiler emits an internal partial and a panel another assembly constructs has to be public.

⚠ Refreshed on a button rather than every frame, and that is not laziness. GC.GetGCMemoryInfo and a walk of the leak tracker's dictionary are both real work, and a panel that did them sixty times a second would be a memory panel that allocates. It also makes the numbers readable: a heap size that changes every frame is one nobody can compare with the one they wrote down a minute ago.

⚠ Refreshing must not collect. GC.GetTotalMemory(true) would give a tidier number by running a blocking gen-2 collection first — which changes what is being measured and stalls the editor. MemorySnapshot passes false and says so.

Fields and properties (3)

  • protected override string TagName
  • public MemoryProviders Providers

    Where the arenas this assembly cannot see into come from.

  • public MemorySnapshot? Snapshot

    The reading on screen, or before one has been taken.

Methods (4)

  • protected override void Build(BuildContext ctx)
  • public void Take()

    Takes a fresh reading and shows it.

  • public void Show(MemorySnapshot reading)

    Shows a reading somebody else took.

  • public static string Bytes(long bytes)

    Formats a byte count the way a person reads one.

Used by (6)

  • DiagnosticsModuleVixen.Editor.Diagnostics
  • DiagnosticsPanelTestsVixen.Editor.App.Tests
  • EditorApplicationVixen.Editor.App
  • MarkupPanelTestsVixen.Editor.Profiler.Tests
  • StatisticsAndMemoryTestsVixen.Editor.Profiler.Tests
  • StatisticsViewVixen.Editor.Profiler