diff options
| author | Ian Lance Taylor <iant@golang.org> | 2009-01-14 08:21:25 -0800 |
|---|---|---|
| committer | Ian Lance Taylor <iant@golang.org> | 2009-01-14 08:21:25 -0800 |
| commit | 2b57a1124e87b0dc8bc1ff6899297b4d7d6e74f2 (patch) | |
| tree | d0144cd3feb6e3aa4fe28e475ef368248b2afd73 /src/runtime/malloc.c | |
| parent | 58b280db3b161310cdccfd45c9aef1999245af0f (diff) | |
| download | go-2b57a1124e87b0dc8bc1ff6899297b4d7d6e74f2.tar.xz | |
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
Diffstat (limited to 'src/runtime/malloc.c')
| -rw-r--r-- | src/runtime/malloc.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/runtime/malloc.c b/src/runtime/malloc.c index 6a494eeafb..258291da2a 100644 --- a/src/runtime/malloc.c +++ b/src/runtime/malloc.c @@ -257,38 +257,3 @@ stackfree(void *v) } free(v); } - -// Go function stubs. - -#ifndef __GNUC__ -#define malloc_Alloc malloc·Alloc -#define malloc_Free malloc·Free -#define malloc_Lookup malloc·Lookup -#define malloc_GetStats malloc·GetStats -#endif - -void -malloc_Alloc(uintptr n, byte *p) -{ - p = malloc(n); - FLUSH(&p); -} - -void -malloc_Free(byte *p) -{ - free(p); -} - -void -malloc_Lookup(byte *p, byte *base, uintptr size) -{ - mlookup(p, &base, &size); -} - -void -malloc_GetStats(MStats *s) -{ - s = &mstats; - FLUSH(&s); -} |
