| 1 |
< |
/* Copyright (c) 1991 Regents of the University of California */ |
| 1 |
> |
/* Copyright (c) 1992 Regents of the University of California */ |
| 2 |
|
|
| 3 |
|
#ifndef lint |
| 4 |
|
static char SCCSid[] = "$SunId$ LBL"; |
| 233 |
|
pagesz = amnt = getpagesize(); |
| 234 |
|
nrem = (int)sbrk(0); /* page align break */ |
| 235 |
|
nrem = pagesz - (nrem&(pagesz-1)); |
| 236 |
< |
bpos = sbrk(nrem); /* word aligned! */ |
| 236 |
> |
bpos = sbrk(nrem); |
| 237 |
|
if ((int)bpos == -1) |
| 238 |
|
return(NULL); |
| 239 |
|
#ifdef MSTATS |
| 240 |
|
b_nsbrked += nrem; |
| 241 |
|
#endif |
| 242 |
+ |
thisamnt = BYTES_WORD - ((unsigned)bpos&(BYTES_WORD-1)); |
| 243 |
+ |
if (thisamnt < BYTES_WORD) { /* align pointer */ |
| 244 |
+ |
bpos += thisamnt; |
| 245 |
+ |
nrem -= thisamnt; |
| 246 |
+ |
} |
| 247 |
|
} |
| 248 |
|
|
| 249 |
|
n = (n+(BYTES_WORD-1))&~(BYTES_WORD-1); /* word align rqst. */ |