VSZ Calculator
Calculate a process's Virtual Size including mapped, reserved and unused address space.
Inputs
Virtual Size (VSZ)
2,074.00MB
Virtual Size (VSZ)
2.025GB
Heap % of VSZ
24.7%
mmap % of VSZ
49.4%
Step by step
Code segment
50 MB
= 50 MB
Heap
512 MB
= 512 MB
Stack(s)
32 MB
= 32 MB
Shared libraries
200 MB
= 200 MB
Memory-mapped files
1024 MB
= 1024 MB
Reserved/unused
256 MB
= 256 MB
Total VSZ
sum of all segments
= 2074 MB (2.025 GB)
How it works
VSZ (Virtual Size) is the total virtual address space a process has mapped, regardless of whether pages are resident in RAM, swapped out, or never yet accessed. It includes code, heap, stacks, shared libraries, memory-mapped files, and reserved-but-unused regions. A large VSZ does not mean the process is consuming that much physical memory — only the RSS portion is resident.
Formula
Virtual size
VSZ = code + heap + stack + shared_libs + mmap_files + reserved
- C
- code segment
- H
- heap
- S
- stack(s)
- L
- shared libraries
- F
- mmap'd files
- R
- reserved mappings
Frequently Asked Questions
Why does a Java process show a huge VSZ?
The JVM reserves its maximum heap size (-Xmx) upfront in the virtual address space even if only a fraction is actually used. This inflates VSZ but does not consume physical RAM until pages are actually touched.
Should I worry about large VSZ values?
Usually not. On 64-bit systems the virtual address space is vast (128TB+). VSZ only becomes a concern if it approaches the per-process RLIMIT_AS limit or if you're running on a 32-bit system with limited address space.