WORDSIZE
newsize = howmany(unit+1, WORDSIZE);
devp->unitmap[unit / WORDSIZE] |= (1 << (unit % WORDSIZE));
int avail = WORDSIZE - 1;
int avail = WORDSIZE - 1;
char entry[WORDSIZE];
char word[WORDSIZE];
char key[WORDSIZE];
#define DATA(b) ((char *)(((uintptr_t)(b)) + WORDSIZE))
#define BLOCK(d) ((TREE *)(((uintptr_t)(d)) - WORDSIZE))
#define LAST(b) (*((TREE **)(((uintptr_t)(b)) - WORDSIZE)))
#define NEXT(b) ((TREE *)(((uintptr_t)(b)) + SIZE(b) + WORDSIZE))
#define BOTTOM(b) ((DATA(b) + SIZE(b) + WORDSIZE) == Baddr)
#define ROUND(s) if (s % WORDSIZE) s += (WORDSIZE - (s % WORDSIZE))
static TREE *List[MINSIZE/WORDSIZE-1]; /* lists of small blocks */
ASSERT(size % WORDSIZE == 0);
size = WORDSIZE;
i = size / WORDSIZE - 1;
#define NPS (WORDSIZE*8)
ASSERT((size + WORDSIZE) * NPS >= MINSIZE);
if ((List[i] = _malloc_unlocked((size + WORDSIZE) * NPS)) == 0)
ASSERT(WORDSIZE == ALIGN);
if ((n = (SIZE(sp) - size)) >= MINSIZE + WORDSIZE) {
n -= WORDSIZE;
SIZE(tp) += SIZE(np) + WORDSIZE;
if ((n = (SIZE(tp) - size)) >= MINSIZE + WORDSIZE) {
n -= WORDSIZE;
(SIZE(np = LAST(tp)) + SIZE(tp) + WORDSIZE) >= size) {
SIZE(np) += SIZE(tp) + WORDSIZE;
ASSERT(SIZE(tp) / WORDSIZE >= 1);
ts = SIZE(tp) / WORDSIZE - 1;
SIZE(tp) += SIZE(np) + WORDSIZE;
SIZE(np) += SIZE(tp) + WORDSIZE;
n = (ssize_t)size + 2 * WORDSIZE;
n -= WORDSIZE;
n += SIZE(tp) + 2 * WORDSIZE;
addr = Baddr - WORDSIZE;
n += WORDSIZE;
SIZE(tp) = n - 2 * WORDSIZE;
while (align < MINSIZE + WORDSIZE)
reqsize = nbytes + align + (MINSIZE + WORDSIZE);
if (frag_size < MINSIZE + WORDSIZE) {
frag_size -= WORDSIZE;
if (frag_size >= MINSIZE + WORDSIZE) {
frag_size -= WORDSIZE;
#define DATA(b) (((char *)(b)) + WORDSIZE)
#define BLOCK(d) ((TREE *)(((char *)(d)) - WORDSIZE))
#define NEXT(b) ((TREE *)(((char *)(b)) + RSIZE(b) + WORDSIZE))
#define BOTTOM(b) ((DATA(b) + RSIZE(b) + WORDSIZE) == Baddr)
#define ROUND(s) if ((s)%WORDSIZE) (s) += (WORDSIZE - ((s)%WORDSIZE))
static TREE *List[MINSIZE/WORDSIZE-1];
static TREE *Last[MINSIZE/WORDSIZE-1];
#define NPS (WORDSIZE*8)
while (align < MINSIZE + WORDSIZE)
reqsize = nbytes + align + (MINSIZE + WORDSIZE);
ASSERT(size % WORDSIZE == 0);
size = WORDSIZE;
if (frag_size < MINSIZE + WORDSIZE) {
frag_size -= WORDSIZE;
i = size / WORDSIZE - 1;
if (frag_size >= MINSIZE + WORDSIZE) {
frag_size -= WORDSIZE;
ASSERT((size + WORDSIZE) * NPS >= MINSIZE);
if ((np = malloc_unlocked((size + WORDSIZE)*NPS)) == NULL)
ctl.prwatch.pr_size = size + WORDSIZE;
ctl.prwatch.pr_size = WORDSIZE; /* size is arbitrary */
ASSERT(WORDSIZE == ALIGN);
if ((n = (SIZE(sp) - size)) >= MINSIZE + WORDSIZE) {
n -= WORDSIZE;
SIZE(tp) += SIZE(np) + WORDSIZE;
if ((n = (SIZE(tp) - size)) >= MINSIZE + WORDSIZE) {
n -= WORDSIZE;
if ((SIZE(np) + SIZE(tp) + WORDSIZE) >= size) {
SIZE(np) += SIZE(tp) + WORDSIZE;
ASSERT(SIZE(tp) / WORDSIZE >= 1);
ts = SIZE(tp) / WORDSIZE - 1;
SIZE(tp) += SIZE(np) + WORDSIZE;
SIZE(np) += SIZE(tp) + WORDSIZE;
n = size + 2 * WORDSIZE;
n -= WORDSIZE;
n += SIZE(tp) + 2 * WORDSIZE;
addr = Baddr - WORDSIZE;
n += WORDSIZE;
SIZE(tp) = n - 2 * WORDSIZE;