diff options
| author | Russ Cox <rsc@golang.org> | 2010-02-10 21:23:08 -0800 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2010-02-10 21:23:08 -0800 |
| commit | 22a7f2a14d8fd870913942707dd3f30a30bb1eeb (patch) | |
| tree | 3ff6573c09dd6d13814515ecae0ac692fc7cc758 /src/pkg/runtime/mfinal.c | |
| parent | fc8e3d4004a1d583d329aa5055407c83e52bd581 (diff) | |
| download | go-22a7f2a14d8fd870913942707dd3f30a30bb1eeb.tar.xz | |
runtime: delete MHeapMapCache, which is useless
because free needs to mark the block as freed to
coordinate with the garbage collector.
(in C++ free can blindly put the block on the free list,
no questions asked, so the cache saves some work.)
R=iant
CC=golang-dev
https://golang.org/cl/206069
Diffstat (limited to 'src/pkg/runtime/mfinal.c')
| -rw-r--r-- | src/pkg/runtime/mfinal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/runtime/mfinal.c b/src/pkg/runtime/mfinal.c index 4fad6aa951..9591747231 100644 --- a/src/pkg/runtime/mfinal.c +++ b/src/pkg/runtime/mfinal.c @@ -97,7 +97,7 @@ addfinalizer(void *p, void (*f)(void*), int32 nret) uint32 *ref; byte *base; - if(!mlookup(p, &base, nil, &ref) || p != base) + if(!mlookup(p, &base, nil, nil, &ref) || p != base) throw("addfinalizer on invalid pointer"); if(f == nil) { if(*ref & RefHasFinalizer) { |
