Add heapdump to support taking memory snapshots