java -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/some/path -server -Xms2048m -Xmx2048m -javaagent:/some/path/apm-agent.jar -Delastic.apm.disable_bootstrap_checks=true -Delastic.apm.service_name=balcode -Delastic.apm.server_urls=https://YOUR_APM_HOST/ -Delastic.apm.environment=production -Delastic.apm.application_packages=com.example.balcode -jar ./build/libs/balcode-0.0.1.jar
apt update && apt install gdb binutils -y
jcmd <pid> VM.native_memory detail
pmap -x <pid> | sort -k 3 -n -r | more
vim /proc/<pid>/smaps
gdb -pid <pid>
> dump memory /file/path start end