internal/gocore: refactor heapArena reading

There are a lot of different historical changes to the heap arena
structure, making Process.readHeap difficult to follow. Refactor to
split out version-specific logic to individual methods.

Reading allocation headers is not yet supported by this CL.

For golang/go#64049.

Change-Id: Ia4198bd8492d8426c7a2cc8671b78c49ab6b7161
Reviewed-by: Michael Knyszek <>
LUCI-TryBot-Result: Go LUCI <>
1 file changed
tree: a1646cbe4c26fe0ad7116e465802ec49d8e2c9e0
  1. cmd/
  2. dwtest/
  3. internal/
  4. codereview.cfg
  6. go.mod
  7. go.sum

Go Debug

Go Reference

This repository holds utilities and libraries for debugging Go programs.

WARNING! Please expect breaking changes and unstable APIs. Most of them are currently are at an early, experimental stage.

Report Issues / Send Patches

This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see

The main issue tracker for the debug repository is located at Prefix your issue with “x/debug:” in the subject line, so it is easy to find.