From 3b2ef42e707bf994b78bae3f56c1d703fe62c1e4 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 26 Jan 2009 17:37:05 -0800 Subject: gc #0. mark and sweep collector. R=r,gri DELTA=472 (423 added, 2 deleted, 47 changed) OCL=23522 CL=23541 --- src/lib/malloc.go | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/lib/malloc.go') diff --git a/src/lib/malloc.go b/src/lib/malloc.go index e3896e94f..8e4397a0b 100644 --- a/src/lib/malloc.go +++ b/src/lib/malloc.go @@ -11,9 +11,14 @@ package malloc type Stats struct { Alloc uint64; Sys uint64; -}; + Stacks uint64; + InusePages uint64; + NextGC uint64; + EnableGC bool; +} -func Alloc(uint64) *byte; -func Free(*byte); -func GetStats() *Stats; -func Lookup(*byte) (*byte, uintptr); +func Alloc(uint64) *byte +func Free(*byte) +func GetStats() *Stats +func Lookup(*byte) (*byte, uintptr) +func GC() -- cgit v1.2.3