plan9port

[fork] Plan 9 from user space
git clone git://src.adamsgaard.dk/plan9port # fast
git clone https://src.adamsgaard.dk/plan9port.git # slow
Log | Files | Refs | README | LICENSE Back to index

commit f7cca88267372c8a5a771923a19ea4f817113cf2
parent cbc99e3e52703f61aee028b34f135c2e05a6a5db
Author: David du Colombier <0intro@gmail.com>
Date:   Tue,  7 Jun 2011 14:25:02 -0400

libventi: import changes from plan 9

R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/4530100

Diffstat:
Msrc/libventi/mem.c | 7+++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/libventi/mem.c b/src/libventi/mem.c @@ -54,8 +54,7 @@ vtbrk(int n) { static Lock lk; static uchar *buf; - static int nbuf; - static int nchunk; + static int nbuf, nchunk; int align, pad; void *p; @@ -67,11 +66,11 @@ vtbrk(int n) align = 4; lock(&lk); - pad = (align - (ulong)buf) & (align-1); + pad = (align - (uintptr)buf) & (align-1); if(n + pad > nbuf) { buf = vtmallocz(ChunkSize); nbuf = ChunkSize; - pad = (align - (ulong)buf) & (align-1); + pad = (align - (uintptr)buf) & (align-1); nchunk++; }