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.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/pkg/runtime/malloc.h') diff --git a/src/pkg/runtime/malloc.h b/src/pkg/runtime/malloc.h index 1e26509bd9..43feef79ed 100644 --- a/src/pkg/runtime/malloc.h +++ b/src/pkg/runtime/malloc.h @@ -513,7 +513,6 @@ void runtime·MHeap_MapBits(MHeap *h); void runtime·MHeap_MapSpans(MHeap *h); void runtime·MHeap_Scavenger(void); -void* runtime·mallocgc(uintptr size, Type* typ, uint32 flag); void* runtime·persistentalloc(uintptr size, uintptr align, uint64 *stat); int32 runtime·mlookup(void *v, byte **base, uintptr *size, MSpan **s); void runtime·gc(int32 force); @@ -537,9 +536,7 @@ enum // flags to malloc FlagNoScan = 1<<0, // GC doesn't have to scan object FlagNoProfiling = 1<<1, // must not profile - FlagNoGC = 1<<2, // must not free or scan for pointers - FlagNoZero = 1<<3, // don't zero memory - FlagNoInvokeGC = 1<<4, // don't invoke GC + FlagNoZero = 1<<2, // don't zero memory }; void runtime·MProf_Malloc(void*, uintptr); -- cgit v1.3