]> Cypherpunks repositories - gostls13.git/commit
runtime: simpler heap map, memory allocation
authorRuss Cox <rsc@golang.org>
Fri, 28 Jan 2011 20:03:26 +0000 (15:03 -0500)
committerRuss Cox <rsc@golang.org>
Fri, 28 Jan 2011 20:03:26 +0000 (15:03 -0500)
commit4608feb18b515ef7e01b906913b10bbca9d6b08a
treea5ff234c0700eb971b2f64f3a85786738462bb9f
parent50f574515c104d7235c5a659f441a787e22abcc1
runtime: simpler heap map, memory allocation

The old heap maps used a multilevel table, but that
was overkill: there are only 1M entries on a 32-bit
machine and we can arrange to use a dense address
range on a 64-bit machine.

The heap map is in bss.  The assumption is that if
we don't touch the pages they won't be mapped in.

Also moved some duplicated memory allocation
code out of the OS-specific files.

R=r
CC=golang-dev
https://golang.org/cl/4118042
26 files changed:
src/pkg/runtime/Makefile
src/pkg/runtime/amd64/traceback.c
src/pkg/runtime/darwin/386/sys.s
src/pkg/runtime/darwin/amd64/sys.s
src/pkg/runtime/darwin/mem.c
src/pkg/runtime/darwin/thread.c
src/pkg/runtime/debug.go
src/pkg/runtime/freebsd/mem.c
src/pkg/runtime/linux/mem.c
src/pkg/runtime/malloc.goc
src/pkg/runtime/malloc.h
src/pkg/runtime/malloc_defs.go
src/pkg/runtime/mcentral.c
src/pkg/runtime/mgc0.c
src/pkg/runtime/mheap.c
src/pkg/runtime/mheapmap32.c [deleted file]
src/pkg/runtime/mheapmap32.h [deleted file]
src/pkg/runtime/mheapmap32_defs.go [deleted file]
src/pkg/runtime/mheapmap64.c [deleted file]
src/pkg/runtime/mheapmap64.h [deleted file]
src/pkg/runtime/mheapmap64_defs.go [deleted file]
src/pkg/runtime/pprof/pprof.go
src/pkg/runtime/proc.c
src/pkg/runtime/runtime.h
src/pkg/runtime/windows/mem.c
test/run