From 6ee4537544fe3176118be01a9349d6525d41c114 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Wed, 10 Feb 2010 00:00:12 -0800 Subject: runtime: garbage collection + malloc performance * add bit tracking finalizer status, avoiding getfinalizer lookup * add ability to allocate uncleared memory R=iant CC=golang-dev http://codereview.appspot.com/207044 --- src/pkg/runtime/slice.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/pkg/runtime/slice.c') diff --git a/src/pkg/runtime/slice.c b/src/pkg/runtime/slice.c index c61c315e8..4ee5fc51f 100644 --- a/src/pkg/runtime/slice.c +++ b/src/pkg/runtime/slice.c @@ -23,14 +23,14 @@ void ret.cap = cap; if((t->elem->kind&KindNoPointers)) - ret.array = mallocgc(size, RefNoPointers, 1); + ret.array = mallocgc(size, RefNoPointers, 1, 1); else ret.array = mal(size); FLUSH(&ret); if(debug) { - printf("makeslice(%S, %d, %d); ret=", + printf("makeslice(%S, %d, %d); ret=", *t->string, nel, cap); ·printslice(ret); } -- cgit v1.2.3