From cd2f8356ce5515c87710bc7ababfee8fdbdee9c3 Mon Sep 17 00:00:00 2001 From: Dmitriy Vyukov Date: Thu, 7 Aug 2014 13:04:04 +0400 Subject: runtime: remove mal/malloc/FlagNoGC/FlagNoInvokeGC FlagNoGC is unused now. FlagNoInvokeGC is unneeded as we don't invoke GC on g0 and when holding locks anyway. mal/malloc have very few uses and you never remember the exact set of flags they use and the difference between them. Moreover, eventually we need to give exact types to all allocations, something what mal/malloc do not support. LGTM=khr R=golang-codereviews, khr CC=golang-codereviews, rsc https://golang.org/cl/117580043 --- src/pkg/runtime/malloc.c | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'src/pkg/runtime/malloc.c') diff --git a/src/pkg/runtime/malloc.c b/src/pkg/runtime/malloc.c index 951117622f..be3280e0f1 100644 --- a/src/pkg/runtime/malloc.c +++ b/src/pkg/runtime/malloc.c @@ -35,12 +35,6 @@ runtime·mallocgc(uintptr size, Type *typ, uint32 flag) return ret; } -void* -runtime·malloc(uintptr size) -{ - return runtime·mallocgc(size, nil, FlagNoInvokeGC); -} - int32 runtime·mlookup(void *v, byte **base, uintptr *size, MSpan **sp) { @@ -399,12 +393,6 @@ runtime·persistentalloc(uintptr size, uintptr align, uint64 *stat) // Runtime stubs. -void* -runtime·mal(uintptr n) -{ - return runtime·mallocgc(n, nil, 0); -} - static void* cnew(Type *typ, intgo n) { -- cgit v1.3