sizeof knows better than earthling Reference: /n/sources/patch/applied/malloclong Date: Wed Feb 23 18:01:19 CET 2005 --- /sys/src/libc/port/malloc.c Wed Feb 23 18:00:17 2005 +++ /sys/src/libc/port/malloc.c Wed Feb 23 18:00:13 2005 @@ -42,9 +42,9 @@ static void* sbrkalloc(ulong n) { - long *x; + ulong *x; - n += 8; /* two longs for us */ + n += 2*sizeof(ulong); /* two longs for us */ x = sbrk(n); if((int)x == -1) return nil; @@ -56,7 +56,7 @@ static int sbrkmerge(void *x, void *y) { - long *lx, *ly; + ulong *lx, *ly; lx = x; if(lx[-1] != 0xDeadBeef)