Base on what I learn up to now and https://go.dev/wiki/Efficiency#memory-allocator-trace, I ought to give you the chance simply do
GODEBUG=allocfreetrace=1 go run .
or
GODEBUG=allocfreetrace=1 <my-program>
Nonetheless, I don’t see any further output associated to hint. Anybody have clue what I possibly lacking?
I attempted in each Linux and MacOS.
Following is my go env in MacOS
❯ go env
AR='ar'
CC='cc'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_ENABLED='1'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
CXX='c++'
GCCGO='gccgo'
GO111MODULE=''
GOARCH='arm64'
GOARM64='v8.0'
GOAUTH='netrc'
GOBIN='/Customers/js/code/go/bin'
GOCACHE='/Customers/js/Library/Caches/go-build'
GOCACHEPROG=''
GODEBUG='allocfreetrace=1'
GOENV='/Customers/js/Library/Software Help/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/1g/md7q63kd08sfmpl7zx4zqfym0000gn/T/go-build3532125912=/tmp/go-build -gno-record-gcc-switches -fno-common'
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMOD='/Customers/js/code/pri/go-dotfile/go.mod'
GOMODCACHE='/Customers/js/code/go/pkg/mod'
GONOPROXY='fj.vms.native/*'
GONOSUMDB='fj.vms.native/*'
GOOS='darwin'
GOPACKAGESDRIVER=''
GOPATH='/Customers/js/code/go'
GOPRIVATE='fj.vms.native/*'
GOPROXY='https://proxy.golang.org'
GOROOT='/decide/homebrew/Cellar/go/1.27.3/libexec'
GOSUMDB='sum.golang.org'
GOTELEMETRY='off'
GOTELEMETRYDIR='/Customers/js/Library/Software Help/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/decide/homebrew/Cellar/go/1.27.3/libexec/pkg/device/darwin_arm64'
GOVCS=''
GOVERSION='go1.27.3'
GOWORK='/Customers/js/code/pri/go-dotfile/go.work'
PKG_CONFIG='pkg-config'
Following is Linux go env
❯ go env
AR='ar'
CC='cc'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_ENABLED='1'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
CXX='c++'
GCCGO='gccgo'
GO111MODULE=''
GOAMD64='v1'
GOARCH='amd64'
GOAUTH='netrc'
GOBIN='/information/dwelling/js/code/go/bin'
GOCACHE='/information/dwelling/js/.cache/go-build'
GOCACHEPROG=''
GODEBUG=''
GOENV='/information/dwelling/js/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build144623771=/tmp/go-build -gno-record-gcc-switches'
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMOD='/information/dwelling/js/code/pri/go-auto-docker/go.mod'
GOMODCACHE='/information/dwelling/js/code/go/pkg/mod'
GONOPROXY='fj.vms.native/*'
GONOSUMDB='fj.vms.native/*'
GOOS='linux'
GOPACKAGESDRIVER=''
GOPATH='/information/dwelling/js/code/go'
GOPRIVATE='fj.vms.native/*'
GOPROXY='https://proxy.golang.org'
GOROOT='/information/dwelling/linuxbrew/.linuxbrew/Cellar/go/1.27.3/libexec'
GOSUMDB='sum.golang.org'
GOTELEMETRY='native'
GOTELEMETRYDIR='/information/dwelling/js/.config/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/information/dwelling/linuxbrew/.linuxbrew/Cellar/go/1.27.3/libexec/pkg/device/linux_amd64'
GOVCS=''
GOVERSION='go1.27.3'
GOWORK='/information/dwelling/js/code/pri/go-auto-docker/go.work'
PKG_CONFIG='pkg-config'

