runtime: faster allocator, garbage collector

GC is still single-threaded.
Multiple threads will happen in another CL.

Garbage collection pauses are typically
about half as long as they were before this CL.

R=brainman, iant, r
CC=golang-dev
https://golang.org/cl/3975046
This commit is contained in:
Russ Cox 2011-02-02 23:03:47 -05:00
parent 6b93a92ac0
commit 1e063b32cd
13 changed files with 720 additions and 321 deletions

View file

@ -69,7 +69,8 @@ type MemStatsType struct {
// Per-size allocation statistics.
// Not locked during update; approximate.
BySize [67]struct {
// 61 is NumSizeClasses in the C code.
BySize [61]struct {
Size uint32
Mallocs uint64
Frees uint64