From 828c68f8d80a642d89cc17e04aeb0116c8bce4ae Mon Sep 17 00:00:00 2001 From: Dmitriy Vyukov Date: Tue, 28 May 2013 11:14:39 +0400 Subject: undo CL 9805043 / 776aba85ece8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit multiple failures on amd64 ««« original CL description runtime: introduce helper persistentalloc() function It is a caching wrapper around SysAlloc() that can allocate small chunks. Use it for symtab allocations. Reduces number of symtab walks from 4 to 3 (reduces buildfuncs time from 10ms to 7.5ms on a large binary, reduces initial heap size by 680K on the same binary). Also can be used for type info allocation, itab allocation. There are also several places in GC where we do the same thing, they can be changed to use persistentalloc(). Also can be used in FixAlloc, because each instance of FixAlloc allocates in 128K regions, which is too eager. R=golang-dev, daniel.morsing, khr CC=golang-dev https://golang.org/cl/9805043 »»» R=golang-dev CC=golang-dev https://golang.org/cl/9822043 --- src/pkg/runtime/malloc.h | 1 - 1 file changed, 1 deletion(-) (limited to 'src/pkg/runtime/malloc.h') diff --git a/src/pkg/runtime/malloc.h b/src/pkg/runtime/malloc.h index 1085344ee1..b4edf7cbef 100644 --- a/src/pkg/runtime/malloc.h +++ b/src/pkg/runtime/malloc.h @@ -445,7 +445,6 @@ void runtime·MHeap_MapBits(MHeap *h); void runtime·MHeap_Scavenger(void); void* runtime·mallocgc(uintptr size, uint32 flag, int32 dogc, int32 zeroed); -void* runtime·persistentalloc(uintptr size, uintptr align); int32 runtime·mlookup(void *v, byte **base, uintptr *size, MSpan **s); void runtime·gc(int32 force); void runtime·markallocated(void *v, uintptr n, bool noptr); -- cgit v1.3