Skip to main content

Module usage

Module usage 

Source
Expand description

Process and thread resource-usage utilities.

The helpers expose memory measurements and operating-system usage records. Platform-specific implementations provide neutral fallback values where native accounting is unavailable.

Functions§

code
Returns the process’s resident code size in bytes, or zero outside Linux.
data
Returns the process’s data and stack size in bytes, or zero outside Linux.
res
Returns the process’s resident memory size in bytes, or zero outside Linux.
shm
Returns shared resident memory size in bytes, or zero outside Linux.
statm
Returns process memory statistics as page counts.
statm_bytes
Returns the statm page counts converted to bytes.
thread_usage
Returns resource usage for the current thread when the platform supports it.
usage
Returns resource usage for the current process.
virt
Returns the process’s virtual memory size in bytes, or zero outside Linux.

Type Aliases§

Usage
Platform representation of process resource usage.