From 0d3a043de9b544ee3fca10fd1070a58f973161c4 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 30 Mar 2009 00:01:07 -0700 Subject: more 386 runtime - can run tiny c programs. R=r DELTA=1926 (1727 added, 168 deleted, 31 changed) OCL=26876 CL=26878 --- src/runtime/malloc.c | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) (limited to 'src/runtime/malloc.c') diff --git a/src/runtime/malloc.c b/src/runtime/malloc.c index 0a1ab28041..5f23f0f645 100644 --- a/src/runtime/malloc.c +++ b/src/runtime/malloc.c @@ -9,6 +9,7 @@ #include "runtime.h" #include "malloc.h" +#include "defs.h" MHeap mheap; MStats mstats; @@ -163,10 +164,10 @@ mlookup(void *v, byte **base, uintptr *size, uint32 **ref) nobj = (s->npages << PageShift) / (n + RefcountOverhead); if((byte*)s->gcref < p || (byte*)(s->gcref+nobj) > p+(s->npages<state, s, p, s->sizeclass, nobj, n, s->npages); + s->state, s, p, s->sizeclass, (uint64)nobj, (uint64)n, (uint64)s->npages); printf("s->base sizeclass %d v=%p base=%p gcref=%p blocksize=%D nobj=%D size=%D end=%p end=%p\n", - s->sizeclass, v, p, s->gcref, s->npages<gcref + nobj, p+(s->npages<sizeclass, v, p, s->gcref, (uint64)s->npages<gcref + nobj, p+(s->npages<