Java Memory
Table of contents
Runtime Data Area
To be added
jmap
jmap
is a CLI tool used to get memory-related information of a JVM.
Example usage
jmap -heap $PID
Errors
If you get the following error,
Can't attach to the process: ptrace(PTRACE_ATTACH, ..) failed for $PID: Operation not permitted
Try the following,
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
If you get the following error,
cannot open binary file
Make sure you are running the command as the same user that started the JVM.