diff options
| author | Russ Cox <rsc@golang.org> | 2010-02-10 00:00:12 -0800 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2010-02-10 00:00:12 -0800 |
| commit | 6ee4537544fe3176118be01a9349d6525d41c114 (patch) | |
| tree | 23f296cb62fc655126252c71d4a82a720875c294 /src/pkg/runtime/slice.c | |
| parent | 25066ce98bab56fa229b482e550ec8f465fd49a1 (diff) | |
| download | golang-6ee4537544fe3176118be01a9349d6525d41c114.tar.gz | |
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
Diffstat (limited to 'src/pkg/runtime/slice.c')
| -rw-r--r-- | src/pkg/runtime/slice.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); } |
