function

unsafe.memoryFootprint

function memoryFootprint(): undefined | number;

Per-process memory footprint in bytes: the memory that only this process keeps the machine from reusing.

Backed by task_info(TASK_VM_INFO).phys_footprint on macOS (the same number process.memoryUsage.rss() reports there), Pss: from /proc/self/smaps_rollup on Linux (shared pages are split between the processes that map them), and PrivateUsage on Windows (this process's commit charge). Returns undefined on platforms with no such accessor; callers should fall back: Bun.unsafe.memoryFootprint() ?? process.memoryUsage.rss().