Dart ProcessInfo
last modified October 18, 2026
The ProcessInfo class in Dart provides information about the
current process. It's part of the dart:io library.
ProcessInfo is a utility class that exposes process-related
metrics. It provides static getters to access information about the running Dart
process.
Memory Usage Statistics
This example demonstrates how to check memory usage of the current process.
import 'dart:io';
void main() {
var memory = ProcessInfo.currentRss;
print('Resident Set Size: ${memory ~/ 1024} KB');
var maxRss = ProcessInfo.maxRss;
print('Maximum RSS: ${maxRss ~/ 1024} KB');
}
We use currentRss for current memory usage.
maxRss returns the high-watermark in bytes for the resident set
size of memory for the process. Note that the meaning of this field is platform
dependent. For example, some memory accounted for here may be shared with other
processes, or if the same page is mapped into a process's address space, it may
be counted twice
$ dart main.dart Resident Set Size: 24576 KB Maximum RSS: 25600 KB
The reported memory values depend on the platform, the Dart VM, and the program; the numbers above are only an example.
Source
Dart ProcessInfo Documentation
This tutorial covered Dart's ProcessInfo class.
Author
List all Dart tutorials.