diff options
Diffstat (limited to 'src/pkg/runtime/mfinal.c')
-rw-r--r-- | src/pkg/runtime/mfinal.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pkg/runtime/mfinal.c b/src/pkg/runtime/mfinal.c index 03ee777c0..f3138145b 100644 --- a/src/pkg/runtime/mfinal.c +++ b/src/pkg/runtime/mfinal.c @@ -5,7 +5,9 @@ #include "runtime.h" #include "malloc.h" -// TODO(rsc): Why not just use mheap.Lock? +// Lock to protect finalizer data structures. +// Cannot reuse mheap.Lock because the finalizer +// maintenance requires allocation. static Lock finlock; // Finalizer hash table. Direct hash, linear scan, at most 3/4 full. @@ -90,7 +92,6 @@ runtime·addfinalizer(void *p, void (*f)(void*), int32 nret) { Fintab newtab; int32 i; - uint32 *ref; byte *base; Finalizer *e; |