Lines Matching refs:Block_t
50 static int vmintree(Block_t* node, Block_t* b)
53 Block_t* node;
54 Block_t* b;
56 { Block_t* t;
69 static int vmonlist(Block_t* list, Block_t* b)
72 Block_t* list;
73 Block_t* b;
84 static int vmisfree(Vmdata_t* vd, Block_t* b)
88 Block_t* b;
108 static int vmisjunk(Vmdata_t* vd, Block_t* b)
112 Block_t* b;
115 Block_t* t;
139 static int vmchktree(Block_t* node)
142 Block_t* node;
144 { Block_t* t;
168 int _vmbestcheck(Vmdata_t* vd, Block_t* freeb)
172 Block_t* freeb; /* known to be free but not on any free list */
176 reg Block_t *b, *endb, *nextb;
188 endb = (Block_t*)(seg->baddr - sizeof(Head_t));
190 { nextb = (Block_t*)((Vmuchar_t*)DATA(b) + (SIZE(b)&~BITS) );
245 static Block_t* bestsearch(Vmdata_t* vd, reg size_t size, Block_t* wanted)
247 static Block_t* bestsearch(vd, size, wanted)
250 Block_t* wanted;
254 reg Block_t *t, *root, *l, *r;
255 Block_t link;
328 { LEFT(r) = NIL(Block_t*);
329 RIGHT(l) = NIL(Block_t*);
361 static int bestreclaim(reg Vmdata_t* vd, Block_t* wanted, int c)
365 Block_t* wanted;
370 reg Block_t *fp, *np, *t, *list;
374 /**/ASSERT(_vmbestcheck(vd, NIL(Block_t*)) == 0);
378 vd->free = NIL(Block_t*);
383 { list = CACHE(vd)[n]; CACHE(vd)[n] = NIL(Block_t*);
416 { np = (Block_t*)((Vmuchar_t*)fp+size+sizeof(Head_t));
421 vd->wild = NIL(Block_t*);
461 TLEFT(fp) = NIL(Block_t*);
466 LEFT(fp) = NIL(Block_t*);
473 LEFT(fp) = RIGHT(fp) = LINK(fp) = NIL(Block_t*);
530 reg Block_t *bp, *tp;
536 bestreclaim(vd,NIL(Block_t*),0);
567 vd->wild = NIL(Block_t*);
584 else bp = NIL(Block_t*);
600 CLRLOCK(vm, local); /**/ASSERT(_vmbestcheck(vd, NIL(Block_t*)) == 0);
617 reg Block_t *tp, *np, *ap;
625 /**/ ASSERT(_vmbestcheck(vd, NIL(Block_t*)) == 0);
632 /**/ ASSERT(sizeof(Block_t) == (sizeof(Body_t)+sizeof(Head_t)) );
642 vd->free = NIL(Block_t*);
661 { bestreclaim(vd,NIL(Block_t*),n);
662 if(vd->root && (tp = bestsearch(vd,size,NIL(Block_t*))) )
669 vd->wild = NIL(Block_t*);
710 CLRLOCK(vm,local); /**/ASSERT(_vmbestcheck(vd, NIL(Block_t*)) == 0);
725 reg Block_t *b, *endb;
732 offset = -1L; b = endb = NIL(Block_t*);
735 endb = (Block_t*)(seg->baddr - sizeof(Head_t));
758 b = (Block_t*)((Vmuchar_t*)DATA(b) + size);
777 reg Block_t *bp;
783 _vmbestcheck(vd, NIL(Block_t*));
799 /**/ASSERT(_vmbestcheck(vd, NIL(Block_t*)) == 0);
825 { bestreclaim(vd,NIL(Block_t*),0);
834 CLRLOCK(vm, local); /**/ASSERT(_vmbestcheck(vd, NIL(Block_t*)) == 0);
850 reg Block_t *rp, *np, *t;
873 /**/ASSERT(_vmbestcheck(vd, NIL(Block_t*)) == 0);
878 { np = (Block_t*)((Vmuchar_t*)rp + oldz + sizeof(Head_t));
882 { vd->free = NIL(Block_t*);
892 vd->wild = NIL(Block_t*);
898 np = (Block_t*)((Vmuchar_t*)np + s);
914 np = (Block_t*)((Vmuchar_t*)rp + s);
943 bestreclaim(vd, NIL(Block_t*), S_CACHE);
954 CLRLOCK(vm, local); /**/ASSERT(_vmbestcheck(vd, NIL(Block_t*)) == 0);
969 Block_t *b, *endb;
978 endb = (Block_t*)(seg->baddr - sizeof(Head_t));
992 b = (Block_t*)((Vmuchar_t*)DATA(b) + (SIZE(b)&~BITS) );
1012 Block_t *tp, *np;
1023 /**/ASSERT(_vmbestcheck(vd, NIL(Block_t*)) == 0);
1032 while(align < extra || (align - extra) < sizeof(Block_t))
1037 bestreclaim(vd,NIL(Block_t*),0);
1051 { if(((Vmuchar_t*)np - (Vmuchar_t*)tp) < (ssize_t)(sizeof(Block_t)+extra) )
1067 if((s = SIZE(np) - size) >= sizeof(Block_t))
1079 bestreclaim(vd,NIL(Block_t*),0); /* coalesce all free blocks */
1085 CLRLOCK(vm, local); /**/ASSERT(_vmbestcheck(vd, NIL(Block_t*)) == 0);
1359 NIL(Block_t*), /* free */
1360 NIL(Block_t*), /* wild */
1361 NIL(Block_t*) /* root */