]> Cypherpunks repositories - gostls13.git/commit
runtime: clock garbage collection on bytes allocated, not pages in use
authorRuss Cox <rsc@golang.org>
Mon, 8 Mar 2010 22:15:44 +0000 (14:15 -0800)
committerRuss Cox <rsc@golang.org>
Mon, 8 Mar 2010 22:15:44 +0000 (14:15 -0800)
commit8ddd6c4181ca29c455cdfc3cf92a6d0219ecad23
tree770415564975c6f128c1e20b20ef76dbfad9d33a
parent18187e7d49502b8fde3307c3719bb77869a7bbd7
runtime: clock garbage collection on bytes allocated, not pages in use
This keeps fragmentation from delaying
garbage collections (and causing more fragmentation).

Cuts fresh godoc (with indexes) from 261M to 166M (120M live).
Cuts toy wc program from 50M to 8M.

Fixes #647.

R=r, cw
CC=golang-dev
https://golang.org/cl/257041
src/pkg/runtime/extern.go
src/pkg/runtime/malloc.cgo
src/pkg/runtime/malloc.h
src/pkg/runtime/mcache.c
src/pkg/runtime/mcentral.c
src/pkg/runtime/mgc0.c
src/pkg/runtime/mheap.c