/ast/src/cmd/tests/vmalloc/ |
H A D | tek.c | 32 Vmalloc_t *vm; local 33 vm = vmopen (Vmdcsbrk, Vmlast, 0); 57 vms[22] = vmalloc (vm, 29850757); 58 vms[23] = vmalloc (vm, 72); 59 vms[24] = vmalloc (vm, 12); 60 vms[25] = vmalloc (vm, 72); 61 vms[26] = vmalloc (vm, 16); 62 vms[27] = vmalloc (vm, 4); 63 vms[28] = vmalloc (vm, 72); 64 vms[29] = vmalloc (vm, 1 [all...] |
H A D | tsmall.c | 24 Vmalloc_t* vm; local 28 if(!(vm = vmopen(Vmdcheap, Vmbest, 0)) ) 31 if(!(addr[0] = vmalloc(vm, 8)) ) 33 if(!(addr[1] = vmalloc(vm, 8)) ) 35 if(!(addr[2] = vmalloc(vm, 8)) ) 38 if(!(addr[3] = vmalloc(vm, 12)) ) 40 if(!(addr[4] = vmalloc(vm, 12)) ) 42 if(!(addr[5] = vmalloc(vm, 12)) ) 45 if(vmfree(vm, addr[1]) < 0) 47 if(vmdbcheck(vm) < [all...] |
H A D | tresize.c | 29 Vmalloc_t *vm; local 33 if(!(vm = vmopen(Vmdcsbrk, Vmbest, 0)) ) 36 if(!(dt[0] = vmalloc(vm, 32)) ) 38 if(!(dt[1] = vmalloc(vm, 32)) ) 40 if(!(dt[2] = vmalloc(vm, 32)) ) 42 vmfree(vm,dt[1]); 43 vmfree(vm,dt[2]); 44 if(vmresize(vm, dt[0], 60, 1) != dt[0]) 46 if(vmresize(vm, dt[0], 32, 1) != dt[0]) 49 if(!(dt[1] = vmalloc(vm, 1 [all...] |
H A D | talign.c | 25 static Void_t* alignmem(Vmalloc_t* vm, Void_t* ca, size_t cs, size_t ns, Vmdisc_t* dc) argument 27 static Void_t* alignmem(vm, ca, cs, ns, dc) 28 Vmalloc_t* vm; 42 Vmalloc_t* vm; local 46 if(!(vm = vmopen(&Disc,Vmbest,0)) ) 48 if(!(data = vmalign(vm,10,13)) ) 52 vmclose(vm); 54 if(!(vm = vmopen(&Disc,Vmlast,0)) ) 56 if(!(data = vmalign(vm,10,13)) ) 62 if(!(vm [all...] |
H A D | tstat.c | 24 Vmalloc_t* vm; local 28 if(!(vm = vmopen(Vmdcheap,Vmbest,0)) ) 30 if(!(addr = vmalloc(vm,123)) ) 32 if(vmstat(vm,&st) < 0 ) 36 if(vmfree(vm,addr) < 0) 38 if(vmstat(vm,&st) < 0 ) 42 vmclose(vm); 44 if(!(vm = vmopen(Vmdcheap,Vmpool,0)) ) 46 if(!(addr = vmalloc(vm,13)) ) 48 if(vmstat(vm, [all...] |
H A D | tlast.c | 25 Vmalloc_t* vm; local 29 if(!(vm = vmopen(Vmdcheap,Vmlast,0)) ) 33 { addr[i] = vmalloc(vm,8); 38 if(vmfree(vm,addr[0]) >= 0) 41 if(vmresize(vm,addr[9],256,1) == NIL(Void_t*)) 46 printf("size[%d]=%d\n",i,vmsize(vm,addr[i])); 47 printf("vmextent=%d\n",vmsize(vm,NIL(Void_t*)));
|
H A D | tpool.c | 25 Void_t* memory(Vmalloc_t* vm, Void_t* caddr, argument 28 Void_t* memory(vm, caddr, oldsize, newsize, disc) 29 Vmalloc_t* vm; 51 Vmalloc_t* vm; local 54 if(!(vm = vmopen(&Disc,Vmpool,0)) ) 58 { addr[i] = vmalloc(vm,15); 64 if(vmfree(vm,addr[i]) < 0) 68 addr[i] = vmalloc(vm,15); 70 if(vmresize(vm,addr[0],16,1) != NIL(Void_t*)) 73 vmfree(vm,add [all...] |
H A D | tcompact.c | 26 Void_t* memory(Vmalloc_t* vm, Void_t* caddr, argument 29 Void_t* memory(vm, caddr, oldsize, newsize, disc) 30 Vmalloc_t* vm; 52 Vmalloc_t* vm; local 55 if(!(vm = vmopen(&Disc,Vmbest,0)) ) 59 { addr[i] = vmalloc(vm,15); 65 if(vmfree(vm,addr[i]) < 0) 68 if(!(addr[0] = vmalloc(vm,30)) ) 72 addr[i] = vmalloc(vm,15); 74 if(vmresize(vm,add [all...] |
H A D | tregion.c | 25 Vmalloc_t *vm, *tv; local 29 if(!(vm = vmopen(Vmdcheap,Vmbest,0)) ) 33 { addr[i] = vmalloc(vm,88); 43 { if((tv = vmregion(addr[i])) != vm) 49 vmclose(vm);
|
H A D | tmalloc.c | 24 Vmalloc_t *vm; local 30 if(!(vm = vmopen(Vmdcheap, Vmbest, 0)) ) 34 if(!(addr[i] = vmalloc(vm,15)) ) 37 if(vmfree(vm,addr[i]) < 0) 40 if(!(addr[i] = vmalloc(vm,15)) ) 44 printf("size[%d]=%d\n",i,vmsize(vm,addr[i])); 45 printf("Extent=%d\n",vmsize(vm,NIL(Void_t*)));
|
/ast/src/lib/libast/vmalloc/ |
H A D | vmregion.c | 44 Vmalloc_t *vm; local 53 for(vm = Vmheap; vm; vm = vm->next) 54 if(vm->data == vd) 58 return vm;
|
H A D | vmdisc.c | 37 Vmdisc_t* vmdisc(Vmalloc_t* vm, Vmdisc_t* disc) argument 39 Vmdisc_t* vmdisc(vm, disc) 40 Vmalloc_t* vm; 44 Vmdisc_t* old = vm->disc; 48 (*old->exceptf)(vm,VM_DISC,(Void_t*)disc,old) != 0 ) 50 vm->disc = disc;
|
H A D | vmgetmem.c | 25 * vm open/close/resize - a handy default for discipline memory functions 37 Void_t* vmgetmem(Vmalloc_t* vm, Void_t* data, size_t size) argument 39 Void_t* vmgetmem(vm, data, size) 40 Vmalloc_t* vm; 45 if (!vm) 48 return vmresize(vm, data, size, VM_RSMOVE|VM_RSCOPY|VM_RSZERO); 49 vmclose(vm);
|
H A D | vmwalk.c | 36 int vmwalk(Vmalloc_t* vm, int(*segf)(Vmalloc_t*, Void_t*, size_t, Vmdisc_t*, Void_t*), Void_t* handle ) argument 38 int vmwalk(vm, segf, handle) 39 Vmalloc_t* vm; 47 if(!vm) 49 for(vm = Vmheap; vm; vm = vm->next) 50 { SETLOCK(vm, 0); 51 for(seg = vm [all...] |
H A D | vmclose.c | 35 int vmclose(Vmalloc_t* vm) argument 37 int vmclose(vm) 38 Vmalloc_t* vm; 43 Vmdata_t* vd = vm->data; 44 Vmdisc_t* disc = vm->disc; 47 if(vm == Vmheap) /* the heap is never freed */ 50 if(vm->disc->exceptf && /* announcing closing event */ 51 (rv = (*vm->disc->exceptf)(vm,VM_CLOSE,(Void_t*)1,vm [all...] |
H A D | vmsegment.c | 36 Void_t* vmsegment(Vmalloc_t* vm, Void_t* addr) argument 38 Void_t* vmsegment(vm, addr) 39 Vmalloc_t* vm; /* region */ 44 Vmdata_t *vd = vm->data; 46 SETLOCK(vm, 0); 53 CLRLOCK(vm, 0);
|
H A D | vmset.c | 36 int vmset(reg Vmalloc_t* vm, int flags, int on) argument 38 int vmset(vm, flags, on) 39 reg Vmalloc_t* vm; /* region being worked on */ 45 Vmdata_t *vd = vm->data; 50 SETLOCK(vm, 0); 57 CLRLOCK(vm, 0);
|
H A D | vmpool.c | 42 static Void_t* poolalloc(Vmalloc_t* vm, reg size_t size, int local) argument 44 static Void_t* poolalloc(vm, size, local ) 45 Vmalloc_t* vm; 53 reg Vmdata_t *vd = vm->data; 64 SETLOCK(vm, local); 80 if((tp = (*_Vmextend)(vm,ROUND(size,vd->incr),NIL(Vmsearch_f))) ) 106 (*_Vmtrace)(vm,NIL(Vmuchar_t*),(Vmuchar_t*)tp,vd->pool,0); 108 CLRLOCK(vm, local); 114 static long pooladdr(Vmalloc_t* vm, reg Void_t* addr, int local) argument 116 static long pooladdr(vm, add 159 poolfree(reg Vmalloc_t* vm, reg Void_t* data, int local ) argument 192 poolresize(Vmalloc_t* vm, Void_t* data, size_t size, int type, int local ) argument 232 poolsize(Vmalloc_t* vm, Void_t* addr, int local) argument 244 poolcompact(Vmalloc_t* vm, int local) argument 282 poolalign(Vmalloc_t* vm, size_t size, size_t align, int local) argument [all...] |
H A D | vmlast.c | 36 static Void_t* lastalloc(Vmalloc_t* vm, size_t size, int local) argument 38 static Void_t* lastalloc(vm, size, local) 39 Vmalloc_t* vm; 47 Vmdata_t *vd = vm->data; 50 SETLOCK(vm, local); 65 if((tp = (*_Vmextend)(vm,size,NIL(Vmsearch_f))) ) 83 (*_Vmtrace)(vm, NIL(Vmuchar_t*), (Vmuchar_t*)tp, orgsize, 0); 86 CLRLOCK(vm, local); 92 static int lastfree(Vmalloc_t* vm, reg Void_t* data, int local ) argument 94 static int lastfree(vm, dat 135 lastresize(Vmalloc_t* vm, reg Void_t* data, size_t size, int type, int local) argument 271 lastaddr(Vmalloc_t* vm, Void_t* addr, int local) argument 294 lastsize(Vmalloc_t* vm, Void_t* addr, int local) argument 319 lastcompact(Vmalloc_t* vm, int local) argument 356 lastalign(Vmalloc_t* vm, size_t size, size_t align, int local) argument [all...] |
H A D | vmdebug.c | 81 static void vmdbwarn(Vmalloc_t* vm, char* mesg, int n) argument 83 static void vmdbwarn(vm, mesg, n) 84 Vmalloc_t* vm; 89 reg Vmdata_t* vd = vm->data; 98 static void dbwarn(Vmalloc_t* vm, Void_t* data, int where, argument 101 static void dbwarn(vm, data, where, file, line, func, type) 102 Vmalloc_t* vm; /* region holding the block */ 132 bufp = (*_Vmstrcpy)(bufp, (*_Vmitoa)(VLONG(vm), 0), ':'); 182 vmdbwarn(vm,buf,(int)(bufp-buf)); 187 static void dbwatch(Vmalloc_t* vm, Void_ argument 264 dbaddr(Vmalloc_t* vm, Void_t* addr, int local) argument 323 dbsize(Vmalloc_t* vm, Void_t* addr, int local) argument 362 dballoc(Vmalloc_t* vm, size_t size, int local) argument 411 dbfree(Vmalloc_t* vm, Void_t* data, int local ) argument 463 dbresize(Vmalloc_t* vm, Void_t* addr, reg size_t size, int type, int local) argument 549 dbcompact(Vmalloc_t* vm, int local) argument 561 vmdbcheck(Vmalloc_t* vm) argument 654 dbalign(Vmalloc_t* vm, size_t size, size_t align, int local) argument 696 vmdbstat(Vmalloc_t* vm) argument [all...] |
H A D | vmprivate.c | 40 static Block_t* _vmextend(reg Vmalloc_t* vm, size_t size, Vmsearch_f searchf ) argument 42 static Block_t* _vmextend(vm, size, searchf ) 43 reg Vmalloc_t* vm; /* region to increase in size */ 52 reg Vmdata_t* vd = vm->data; 67 if(size > 2*vd->incr && vm->disc->round < vd->incr) 73 { addr = (Vmuchar_t*)(*vm->disc->memoryf)(vm,seg->addr,seg->extent, 74 seg->extent+size,vm->disc); 81 { if(!(addr = (Vmuchar_t*)(*vm->disc->memoryf)(vm, NI 186 _vmtruncate(Vmalloc_t* vm, Seg_t* seg, size_t size, int exact) argument 257 _vmlock(Vmalloc_t* vm, int locking) argument [all...] |
/ast/src/lib/libast/include/ |
H A D | vmalloc.h | 95 #define VM_MEMORYF 0000020 /* vm was allocated by memoryf */ 210 #define _VM_(vm) ((Vmalloc_t*)(vm)) 216 #define _VMFILE_(vm) (_VM_(vm)->file = (char*)__FILE__) 218 #define _VMFILE_(vm) (_VM_(vm)->file = (char*)0) 222 #define _VMLINE_(vm) (_VM_(vm)->line = __LINE__) 224 #define _VMLINE_(vm) (_VM [all...] |
/ast/src/lib/libast/cdt/ |
H A D | dtnew.c | 25 * dtopen() with handle placed in specific vm region 34 Vmalloc_t* vm; member in struct:Dc_s 51 return vmresize(((Dc_t*)disc)->vm, addr, size, VM_RSMOVE); 55 * open a dictionary using disc->memoryf if set or vm otherwise 59 _dtnew(Vmalloc_t* vm, Dtdisc_t* disc, Dtmethod_t* meth, unsigned long version) argument 69 dc.vm = vm; 78 dtnew(Vmalloc_t* vm, Dtdisc_t* disc, Dtmethod_t* meth) argument 80 return _dtnew(vm, disc, meth, 20050420L);
|
/ast/src/lib/libcoshell/ |
H A D | coexport.c | 42 if (!(co->exdisc = vmnewof(co->vm, 0, Dtdisc_t, 1, 0))) 47 if (!(co->export = dtnew(co->vm, co->exdisc, Dtset))) 49 vmfree(co->vm, co->exdisc); 57 if (!(ex = vmnewof(co->vm, 0, Coexport_t, 1, strlen(name)))) 64 vmfree(co->vm, ex->value); 69 if (!(v = vmstrdup(co->vm, value))) 76 vmfree(co->vm, ex);
|
/ast/src/lib/librecsort/ |
H A D | rsclear.c | 40 if(rs->vm) 41 vmclear(rs->vm);
|