HeapSample class
A single heap memory usage sample from the VM service.
Captured every 500ms alongside the timeline poll. Used by
MemoryPressureDetector for trend analysis and included in
session export for offline investigation.
Constructors
Properties
- externalUsage → int
-
Non-Dart memory retained by Dart objects (images, platform channels).
Applies GC pressure but is separate from heapUsage/heapCapacity.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- heapCapacity → int
-
Total Dart heap capacity in bytes (from OS perspective).
final
- heapUsage → int
-
Current Dart heap usage in bytes.
final
- nativeBytes → int?
-
Estimated native (non-Dart) memory: RSS minus Dart heap usage.
Null when
rssBytesis unavailable. Clamped to0, rssBytesto handle edge cases where RSS lags behind heap expansion.no setter - rssBytes → int?
-
Process-level Resident Set Size in bytes, from ProcessInfo.currentRss.
Null when running on web or when ProcessInfo is unavailable.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- timestamp → DateTime
-
When this sample was captured.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited