Lines Matching refs:vd
46 reg Vmdata_t* vd = vm->data; local
50 SETINUSE(vd, inuse);
51 if(!(local = vd->mode&VM_TRUST))
52 { GETLOCAL(vd,local);
53 if(ISLOCK(vd,local))
54 { CLRINUSE(vd, inuse);
57 SETLOCK(vd,local);
63 { for(last = NIL(Seg_t*), seg = vd->seg; seg; last = seg, seg = seg->next)
68 seg->next = vd->seg;
69 vd->seg = seg;
79 else if(vd->mode&VM_AGAIN)
80 vd->mode &= ~VM_AGAIN;
93 vd->free = seg->last = tp;
95 if(!local && (vd->mode&VM_TRACE) && _Vmtrace)
99 CLRLOCK(vd,local);
101 CLRINUSE(vd, inuse);
116 reg Vmdata_t* vd = vm->data; local
122 SETINUSE(vd, inuse);
123 if(!(local = vd->mode&VM_TRUST) )
124 { GETLOCAL(vd, local);
125 if(ISLOCK(vd, local))
126 { CLRINUSE(vd, inuse);
129 SETLOCK(vd, local);
131 if(data != (Void_t*)vd->free)
134 CLRLOCK(vd, local);
135 CLRINUSE(vd, inuse);
139 seg = vd->seg;
140 if(!local && (vd->mode&VM_TRACE) && _Vmtrace)
147 vd->free = NIL(Block_t*);
154 CLRLOCK(vd, local);
157 CLRINUSE(vd, inuse);
175 reg Vmdata_t* vd = vm->data; local
181 SETINUSE(vd, inuse);
189 CLRINUSE(vd, inuse);
193 if(!(local = vd->mode&VM_TRUST))
194 { GETLOCAL(vd, local);
195 if(ISLOCK(vd, local))
196 { CLRINUSE(vd, inuse);
199 SETLOCK(vd, local);
204 if(data == (Void_t*)vd->free)
205 seg = vd->seg;
208 for(seg = vd->seg; seg; seg = seg->next)
213 { CLRLOCK(vd,0);
214 CLRINUSE(vd, inuse);
239 { ds = size-s; ds = ROUND(ds,vd->incr);
256 { tp = vd->free;
258 { vd->free = tp;
267 if(s >= 0 && seg != vd->seg)
276 seg = vd->seg;
293 vd->free = seg->last = (Block_t*)data;
295 if(!local && (vd->mode&VM_TRACE) && _Vmtrace)
299 CLRLOCK(vd, local);
305 CLRINUSE(vd, inuse);
318 reg Vmdata_t* vd = vm->data; local
320 if(!(vd->mode&VM_TRUST) && ISLOCK(vd,0))
322 if(!vd->free || addr < (Void_t*)vd->free || addr >= (Void_t*)vd->seg->baddr)
324 else return (Vmuchar_t*)addr - (Vmuchar_t*)vd->free;
335 reg Vmdata_t* vd = vm->data; local
337 if(!(vd->mode&VM_TRUST) && ISLOCK(vd,0))
339 if(!vd->free || addr != (Void_t*)vd->free )
341 else if(vd->seg->free)
342 return (Vmuchar_t*)vd->seg->free - (Vmuchar_t*)addr;
343 else return (Vmuchar_t*)vd->seg->baddr - (Vmuchar_t*)addr - sizeof(Head_t);
356 reg Vmdata_t* vd = vm->data; local
359 SETINUSE(vd, inuse);
360 if(!(vd->mode&VM_TRUST))
361 { if(ISLOCK(vd,0))
362 { CLRINUSE(vd, inuse);
365 SETLOCK(vd,0);
368 for(seg = vd->seg; seg; seg = next)
383 if((vd->mode&VM_TRACE) && _Vmtrace)
386 CLRLOCK(vd,0);
387 CLRINUSE(vd, inuse);
405 reg Vmdata_t* vd = vm->data; local
410 SETINUSE(vd, inuse);
411 if(!(local = vd->mode&VM_TRUST) )
412 { GETLOCAL(vd,local);
413 if(ISLOCK(vd,local) )
414 { CLRINUSE(vd, inuse);
417 SETLOCK(vd,local);
430 for(seg = vd->seg; seg; seg = seg->next)
447 vd->free = seg->last = (Block_t*)data;
449 if(!local && !(vd->mode&VM_TRUST) && _Vmtrace && (vd->mode&VM_TRACE) )
453 CLRLOCK(vd,local);
456 CLRINUSE(vd, inuse);