core/commands/mem/mem library
Classes
- ClassAlloc
- Per-class allocation record inside a profile snapshot.
- ClassDiff
- A single class diff entry (after − before).
- IsolateHeapInfo
-
One isolate's heap snapshot returned by
getMemoryUsage. - MemAppDied
- App process died during the call.
- MemDiffError
- Generic / unrecognised error.
- MemDiffIsolateMismatch
- Profiles come from different isolates and cannot be meaningfully diffed.
- MemDiffReadError
- One or both profile files could not be read or parsed.
- MemDiffResult
- Result of diffMemProfiles.
- MemDiffSuccess
- Diff computed successfully.
- MemError
- Generic / unrecognised error.
- MemNativeError
- Generic / unrecognised error.
- MemNativeMissingInfo
- A required piece of session state (app-id, PID) could not be resolved.
- MemNativeResult
- Result of runMemNative.
- MemNativeSuccess
- The tool ran successfully; output is the raw stdout.
- MemNativeToolMissing
- A required platform tool was not found on PATH.
- MemNativeUnsupportedPlatform
-
The current platform does not support
fdb mem native. - MemProfile
-
A full allocation profile captured by
getAllocationProfile. - MemProfileAppDied
- App process died during the call.
- MemProfileError
- Generic / unrecognised error.
- MemProfileIsolateNotFound
- Requested isolate ID was not found.
- MemProfileMultiSuccess
- Profiles captured and written to disk for multiple isolates.
- MemProfileResult
- Result of captureMemProfile.
- MemProfileSuccess
- Profile captured and written to disk (single isolate).
- MemResult
- Result of getHeapUsage.
- MemSuccess
- Successfully retrieved per-isolate heap info.
Enums
- MemDiffSort
- Sort key for diff output.
Functions
-
captureMemProfile(
MemProfileInput input) → Future< MemProfileResult> -
Captures a full allocation profile and writes it to
input.outputPath. -
diffMemProfiles(
MemDiffInput input) → Future< MemDiffResult> - Computes the allocation diff between two profile files.
-
getHeapUsage(
MemInput _) → Future< MemResult> - Returns heap usage totals for every isolate in the running VM.
-
runMemNative(
MemNativeInput input, {void onCommand(String command)?}) → Future< MemNativeResult> - Shells out to a platform-native memory tool and returns its raw output.
Typedefs
- MemDiffInput = ({String afterPath, String beforePath, MemDiffSort sort, int? topN})
- Input for diffMemProfiles.
- MemInput = ()
- Input for getHeapUsage. No parameters; always targets all isolates.
- MemNativeInput = ({String? appId, int? pid, String? tool})
- Input for runMemNative.
- MemProfileInput = ({bool allIsolates, String? isolateId, String outputPath})
- Input for captureMemProfile.