Skip to content

Instantly share code, notes, and snippets.

@quoll
Created May 5, 2020 22:38
Show Gist options
  • Save quoll/62924ea8139a39a22a27e6c29818e37e to your computer and use it in GitHub Desktop.
Save quoll/62924ea8139a39a22a27e6c29818e37e to your computer and use it in GitHub Desktop.
string_heap() {
pid=$1
range=`grep heap /proc/${pid}/maps | cut -d' ' -f1`
dd status=none if=/proc/${pid}/mem ibs=4096 skip=$((16#${range/-*/}/4096)) count=$(((16#${range/*-/}-16#${range/-*/})/4096)) | strings
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment