diff options
| author | Russ Cox <rsc@golang.org> | 2010-03-26 14:15:30 -0700 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2010-03-26 14:15:30 -0700 |
| commit | c6221cc53e654c4e030ee09cce92c1520bf097f5 (patch) | |
| tree | 286db01b6d244d9f2733251fcfbe2412ca44bb09 /src/pkg/runtime/malloc.cgo | |
| parent | ff95626036bb6ce991fca21ea69f1a00b77958a4 (diff) | |
| download | golang-c6221cc53e654c4e030ee09cce92c1520bf097f5.tar.gz | |
runtime: run all finalizers in a single goroutine.
eliminate second pass of mark+sweep
by scanning finalizer table specially.
R=r
CC=golang-dev
http://codereview.appspot.com/782041
Diffstat (limited to 'src/pkg/runtime/malloc.cgo')
| -rw-r--r-- | src/pkg/runtime/malloc.cgo | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/runtime/malloc.cgo b/src/pkg/runtime/malloc.cgo index b9572b2a7..fed8e037c 100644 --- a/src/pkg/runtime/malloc.cgo +++ b/src/pkg/runtime/malloc.cgo @@ -366,7 +366,7 @@ func SetFinalizer(obj Eface, finalizer Eface) { } nret = (nret + sizeof(void*)-1) & ~(sizeof(void*)-1); - if(getfinalizer(obj.data, 0, nil)) { + if(getfinalizer(obj.data, 0)) { printf("runtime.SetFinalizer: finalizer already set"); goto throw; } |
