The managed runtime's memory state, as this side can read it.
The runtime keeps the numbers and this only asks for them, so nothing here is remembered between frames.
The field order is the layout both sides write and read. The eight byte fields before the four byte ones are what make the sample 192 bytes on both sides without padding, the same reason TimeManager's snapshot is laid out that way. The managed side mirrors it in NebulaEngine/engine/MemoryProfile.cs, and the size is checked in nsharp/memoryprofile.cc.
The generations are the ones the runtime reports. The last two are the large object heap and the pinned object heap, which are collected with gen2 rather than on a count of their own, so the sizes go to five while the counts a panel would read stop at three.
- See also
- Scripting::ScriptFeatureUnit
-
Scripting::MemoryProfilerPanel
-
Nebula.Game.MemoryProfile
- Copyright
- (C) 2026 Individual contributors, see AUTHORS file
| void Scripting::MemoryProfile::Clear |
( |
| ) |
|
|
static |
drop the resolved entry points. The server closes, and the pointers go stale with it
The server closes and the pointers it answered with go stale with it, so this is what the feature unit calls when it deactivates.
A reload registers again.
| bool Scripting::MemoryProfile::Read |
( |
Sample & | out | ) |
|
|
static |
read the runtime's memory state. Returns false when there is nothing to read
The buffer is this side's, so the managed side only writes into it.
A read that fails leaves the sample zeroed, which is what keeps the panel from drawing numbers that were never read.