Lines Matching defs:data

46 	reg Vmdata_t*	vd = vm->data;
106 static int lastfree(Vmalloc_t* vm, reg Void_t* data )
108 static int lastfree(vm, data)
110 reg Void_t* data;
116 reg Vmdata_t* vd = vm->data;
119 if(!data)
131 if(data != (Void_t*)vd->free)
133 (void)(*vm->disc->exceptf)(vm,VM_BADADDR,data,vm->disc);
142 s = (Vmuchar_t*)(seg->free) - (Vmuchar_t*)data;
143 else s = (Vmuchar_t*)BLOCK(seg->baddr) - (Vmuchar_t*)data;
144 (*_Vmtrace)(vm, (Vmuchar_t*)data, NIL(Vmuchar_t*), s, 0);
148 fp = (Block_t*)data;
150 SIZE(fp) = ((Vmuchar_t*)BLOCK(seg->baddr) - (Vmuchar_t*)data) - sizeof(Head_t);
155 ANNOUNCE(local, vm, VM_FREE, data, vm->disc);
162 static Void_t* lastresize(Vmalloc_t* vm, reg Void_t* data, size_t size, int type )
164 static Void_t* lastresize(vm, data, size, type )
166 reg Void_t* data;
175 reg Vmdata_t* vd = vm->data;
182 if(!data)
184 data = lastalloc(vm,size);
188 { (void)lastfree(vm,data);
200 orgdata = data;
204 if(data == (Void_t*)vd->free)
209 if(data >= seg->addr && data < (Void_t*)seg->baddr)
211 if(!seg || (VLONG(data)%ALIGN) != 0 ||
212 (seg->last && (Vmuchar_t*)data > (Vmuchar_t*)seg->last) )
220 if(data != seg->last)
221 { if(seg->last && (Vmuchar_t*)data < (Vmuchar_t*)seg->last)
222 oldsize = (Vmuchar_t*)seg->last - (Vmuchar_t*)data;
223 else oldsize = (Vmuchar_t*)BLOCK(seg->baddr) - (Vmuchar_t*)data;
227 { s = (Vmuchar_t*)BLOCK(seg->baddr) - (Vmuchar_t*)data;
231 { oldsize = (Vmuchar_t*)tp - (Vmuchar_t*)data;
254 data = NIL(Void_t*);
259 data = NIL(Void_t*);
264 memcpy(addr, data, ds);
268 { tp = (Block_t*)data;
275 data = addr;
278 (Vmuchar_t*)data;
285 if(data)
287 { tp = (Block_t*)((Vmuchar_t*)data + size);
293 vd->free = seg->last = (Block_t*)data;
296 (*_Vmtrace)(vm,(Vmuchar_t*)orgdata,(Vmuchar_t*)data,orgsize,0);
300 ANNOUNCE(local, vm, VM_RESIZE, data, vm->disc);
302 done: if(data && (type&VM_RSZERO) && size > oldsize)
303 memset((Void_t*)((Vmuchar_t*)data + oldsize), 0, size-oldsize);
306 return data;
318 reg Vmdata_t* vd = vm->data;
335 reg Vmdata_t* vd = vm->data;
356 reg Vmdata_t* vd = vm->data;
400 reg Vmuchar_t* data;
405 reg Vmdata_t* vd = vm->data;
426 if(!(data = (Vmuchar_t*)KPVALLOC(vm,s,lastalloc)) )
431 if(seg->last == (Block_t*)data)
436 if((s = (size_t)(VLONG(data)%align)) != 0)
437 data += align-s; /**/ASSERT((VLONG(data)%align) == 0);
440 next = (Block_t*)(data+size);
447 vd->free = seg->last = (Block_t*)data;
450 (*_Vmtrace)(vm,NIL(Vmuchar_t*),data,orgsize,orgalign);
454 ANNOUNCE(local, vm, VM_ALLOC, (Void_t*)data, vm->disc);
457 return (Void_t*)data;