From 2b57a1124e87b0dc8bc1ff6899297b4d7d6e74f2 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 14 Jan 2009 08:21:25 -0800 Subject: Add cgo2c program to translate mixed Go/C code into C. This lets us use a single source file for both 6c and gcc, handling the incompatible handling of return values. R=rsc DELTA=649 (613 added, 35 deleted, 1 changed) OCL=22682 CL=22730 --- src/runtime/malloc.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/runtime/malloc.h') diff --git a/src/runtime/malloc.h b/src/runtime/malloc.h index 8b4d76919a..ca05f0191e 100644 --- a/src/runtime/malloc.h +++ b/src/runtime/malloc.h @@ -364,3 +364,7 @@ void MHeap_Init(MHeap *h, void *(*allocator)(uintptr)); MSpan* MHeap_Alloc(MHeap *h, uintptr npage, int32 sizeclass); void MHeap_Free(MHeap *h, MSpan *s); MSpan* MHeap_Lookup(MHeap *h, PageID p); + +void* malloc(uintptr size); +void free(void *v); +void mlookup(void *v, byte **base, uintptr *size); -- cgit v1.3-5-g9baa