mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
libventi: import changes from plan 9
R=rsc CC=plan9port.codebot http://codereview.appspot.com/4530100
This commit is contained in:
parent
cbc99e3e52
commit
f7cca88267
1 changed files with 3 additions and 4 deletions
|
@ -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++;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue