The managed memory contract the editor's c# memory panel reads.
This side only answers with cumulative numbers. The panel keeps the history and computes the per frame deltas itself, so nothing here has to remember what it said last frame, and a hot reload does not take a history with it.
Read allocates nothing on a frame where nothing was collected. The running total is read precise: read approximate, the runtime publishes it in allocation quanta of about 8 KB rather than per allocation, so a steady few hundred bytes a frame shows as nothing for ten frames and then as one jump, which reads as a spike that never happened. The per generation numbers come from the snapshot of the last collection, and the only API that answers with them is GC.GetGCMemoryInfo, which allocates about 288 bytes per call because the spans it hands back are arrays the runtime makes for the call. That call is made only on the frame a collection happened, which is the only frame those numbers change.
Sample is the layout contract between the two sides and is copied to an unmanaged buffer, so it has to stay blittable, sequential and free of reference fields. Keep the 8 byte fields before the 4 byte fields so both sides agree on the offsets. The C++ mirror asserts its size in nsharp/memoryprofile.cc.