]> Cypherpunks repositories - gostls13.git/commit
runtime: accurately record whether heap memory is reserved
authorIan Lance Taylor <iant@golang.org>
Tue, 25 Mar 2014 20:22:19 +0000 (13:22 -0700)
committerIan Lance Taylor <iant@golang.org>
Tue, 25 Mar 2014 20:22:19 +0000 (13:22 -0700)
commit4ebfa8319914e1ed9727592d1fa360ce339b7597
tree23893ff60e07c9b69a0b3af54e03c1f08491f33e
parentcc2c5fc3d28ef2e179e605fa41d5e7eec04e34ac
runtime: accurately record whether heap memory is reserved

The existing code did not have a clear notion of whether
memory has been actually reserved.  It checked based on
whether in 32-bit mode or 64-bit mode and (on GNU/Linux) the
requested address, but it confused the requested address and
the returned address.

LGTM=rsc
R=rsc, dvyukov
CC=golang-codereviews, michael.hudson
https://golang.org/cl/79610043
14 files changed:
src/pkg/runtime/malloc.goc
src/pkg/runtime/malloc.h
src/pkg/runtime/mem_darwin.c
src/pkg/runtime/mem_dragonfly.c
src/pkg/runtime/mem_freebsd.c
src/pkg/runtime/mem_linux.c
src/pkg/runtime/mem_nacl.c
src/pkg/runtime/mem_netbsd.c
src/pkg/runtime/mem_openbsd.c
src/pkg/runtime/mem_plan9.c
src/pkg/runtime/mem_solaris.c
src/pkg/runtime/mem_windows.c
src/pkg/runtime/mgc0.c
src/pkg/runtime/mheap.c