]> Cypherpunks repositories - gostls13.git/commit
runtime: make the GC bitmap a byte array
authorDmitriy Vyukov <dvyukov@google.com>
Tue, 19 Aug 2014 13:38:00 +0000 (17:38 +0400)
committerDmitriy Vyukov <dvyukov@google.com>
Tue, 19 Aug 2014 13:38:00 +0000 (17:38 +0400)
commitff3fa1b32dba4448bed45282b1038a4f8e9c23dc
treed5c7458bf20b8918dde0750efb67b6d9aaa33026
parentfb44fb6cb7fdadced51db03403b9f5d93fefa5a5
runtime: make the GC bitmap a byte array
Half the code in the garbage collector accesses the bitmap
as an array of bytes instead of as an array of uintptrs.
This is tricky to do correctly in a portable fashion,
it breaks on big-endian systems.
Make the bitmap a byte array.
Simplifies markallocated, scanblock and span sweep along the way,
as we don't need to recalculate bitmap position for each word.

LGTM=khr
R=golang-codereviews, khr
CC=golang-codereviews, rlh, rsc
https://golang.org/cl/125250043
src/pkg/runtime/asm_386.s
src/pkg/runtime/asm_amd64.s
src/pkg/runtime/atomic_arm.c
src/pkg/runtime/heapdump.c
src/pkg/runtime/malloc.go
src/pkg/runtime/mgc0.c
src/pkg/runtime/mgc0.h
src/pkg/runtime/runtime.h