--- /n/sources/plan9/sys/src/9/port/lib.h Sat Jan 10 10:00:05 2015 +++ /sys/src/9/port/lib.h Sun Jun 28 00:00:00 2026 @@ -9,7 +9,7 @@ * mem routines */ extern void* memccpy(void*, void*, int, ulong); -extern void* memset(void*, int, ulong); +extern void* memset(void*, int, uintptr); extern int memcmp(void*, void*, ulong); extern void* memmove(void*, void*, ulong); extern void* memchr(void*, int, ulong); --- /n/sources/plan9/sys/src/9/port/portfns.h Sat Jan 10 10:00:05 2015 +++ /sys/src/9/port/portfns.h Sun Jun 28 00:00:00 2026 @@ -123,8 +123,8 @@ int freebroken(void); void freepte(Segment*, Pte*); void getcolor(ulong, ulong*, ulong*, ulong*); -ulong getmalloctag(void*); -ulong getrealloctag(void*); +uintptr getmalloctag(void*); +uintptr getrealloctag(void*); void gotolabel(Label*); char* getconfenv(void); int haswaitq(void*); @@ -176,9 +176,9 @@ Page* lookpage(Image*, ulong); #define MS2NS(n) (((vlong)(n))*1000000LL) void machinit(void); -void* mallocz(ulong, int); -void* malloc(ulong); -void* mallocalign(ulong, ulong, long, ulong); +void* mallocz(uintptr, int); +void* malloc(uintptr); +void* mallocalign(uintptr, uintptr, vlong, uintptr); void mallocsummary(void); Block* mem2bl(uchar*, int); Block* mem2block(void *, ulong, int); @@ -193,7 +193,7 @@ void mouseresize(void); void mountfree(Mount*); ulong ms2tk(ulong); -ulong msize(void*); +uintptr msize(void*); ulong ms2tk(ulong); uvlong ms2fastticks(ulong); void mul64fract(uvlong*, uvlong, uvlong); @@ -301,7 +301,7 @@ int readnum(ulong, char*, ulong, ulong, int); int readstr(ulong, char*, ulong, char*); void ready(Proc*); -void* realloc(void *v, ulong size); +void* realloc(void *v, uintptr size); void rebootcmd(int, char**); void reboot(void*, void*, ulong); void relocateseg(Segment*, ulong); @@ -326,13 +326,13 @@ int setcolor(ulong, ulong, ulong, ulong); void setkernur(Ureg*, Proc*); int setlabel(Label*); -void setmalloctag(void*, ulong); -void setrealloctag(void*, ulong); +void setmalloctag(void*, uintptr); +void setrealloctag(void*, uintptr); void setregisters(Ureg*, char*, char*, int); void setswapchan(Chan*); char* skipslash(char*); void sleep(Rendez*, int(*)(void*), void*); -void* smalloc(ulong); +void* smalloc(uintptr); int splhi(void); int spllo(void); void splx(int); --- /n/sources/plan9/sys/src/9/port/alloc.c Sat Jan 10 10:00:05 2015 +++ /sys/src/9/port/alloc.c Sun Jun 28 00:00:00 2026 @@ -166,7 +166,7 @@ void* -smalloc(ulong size) +smalloc(uintptr size) { void *v; @@ -187,7 +187,7 @@ } void* -malloc(ulong size) +malloc(uintptr size) { void *v; @@ -204,7 +204,7 @@ } void* -mallocz(ulong size, int clr) +mallocz(uintptr size, int clr) { void *v; @@ -220,7 +220,7 @@ } void* -mallocalign(ulong size, ulong align, long offset, ulong span) +mallocalign(uintptr size, uintptr align, vlong offset, uintptr span) { void *v; @@ -243,7 +243,7 @@ } void* -realloc(void *v, ulong size) +realloc(void *v, uintptr size) { void *nv; @@ -261,7 +261,7 @@ return nv; } -ulong +uintptr msize(void *v) { return poolmsize(mainmem, (ulong*)v-Npadlong)-Npadlong*sizeof(ulong); @@ -277,7 +277,7 @@ } void -setmalloctag(void *v, ulong pc) +setmalloctag(void *v, uintptr pc) { ulong *u; USED(v, pc); @@ -288,7 +288,7 @@ } void -setrealloctag(void *v, ulong pc) +setrealloctag(void *v, uintptr pc) { ulong *u; USED(v, pc); @@ -298,7 +298,7 @@ u[-Npadlong+ReallocOffset] = pc; } -ulong +uintptr getmalloctag(void *v) { USED(v); @@ -307,7 +307,7 @@ return ((ulong*)v)[-Npadlong+MallocOffset]; } -ulong +uintptr getrealloctag(void *v) { USED(v);