Home
last modified time | relevance | path

Searched refs:vm (Results 1 – 25 of 94) sorted by relevance

1234

/titanic_44/usr/src/lib/libast/common/vmalloc/
H A Dvmwalk.c36 int vmwalk(Vmalloc_t* vm, int(*segf)(Vmalloc_t*, Void_t*, size_t, Vmdisc_t*, Void_t*), Void_t* hand… in vmwalk() argument
38 int vmwalk(vm, segf, handle) in vmwalk()
39 Vmalloc_t* vm; in vmwalk()
47 if(!vm)
48 { for(vm = Vmheap; vm; vm = vm->next)
49 { if(!(vm->data->mode&VM_TRUST) && ISLOCK(vm->data,0) )
52 SETLOCK(vm->data,0);
53 for(seg = vm->data->seg; seg; seg = seg->next)
54 { rv = (*segf)(vm, seg->addr, seg->extent, vm->disc, handle);
58 CLRLOCK(vm->data,0);
[all …]
H A Dvmdebug.c82 static void vmdbwarn(Vmalloc_t* vm, char* mesg, int n) in vmdbwarn() argument
84 static void vmdbwarn(vm, mesg, n) in vmdbwarn()
85 Vmalloc_t* vm; in vmdbwarn()
90 reg Vmdata_t* vd = vm->data;
99 static void dbwarn(Vmalloc_t* vm, Void_t* data, int where, in dbwarn() argument
102 static void dbwarn(vm, data, where, file, line, func, type) in dbwarn()
103 Vmalloc_t* vm; /* region holding the block */ in dbwarn()
133 bufp = (*_Vmstrcpy)(bufp, (*_Vmitoa)(VLONG(vm), 0), ':');
183 vmdbwarn(vm,buf,(bufp-buf));
188 static void dbwatch(Vmalloc_t* vm, Void_t* data, in dbwatch() argument
[all …]
H A Dvmpool.c42 static Void_t* poolalloc(Vmalloc_t* vm, reg size_t size) in poolalloc() argument
44 static Void_t* poolalloc(vm, size ) in poolalloc()
45 Vmalloc_t* vm; in poolalloc()
49 reg Vmdata_t* vd = vm->data;
88 { if((tp = (*_Vmextend)(vm,ROUND(size,vd->incr),NIL(Vmsearch_f))) )
117 (*_Vmtrace)(vm,NIL(Vmuchar_t*),(Vmuchar_t*)tp,vd->pool,0);
120 ANNOUNCE(local, vm, VM_ALLOC, (Void_t*)tp, vm->disc);
126 static long pooladdr(Vmalloc_t* vm, reg Void_t* addr) in pooladdr() argument
128 static long pooladdr(vm, addr) in pooladdr()
129 Vmalloc_t* vm; in pooladdr()
[all …]
H A Dvmprofile.c36 #define PFVM(pf) ((pf)->data.data.vm)
54 Vmalloc_t* vm; /* region alloc from */ member
76 static Pfobj_t* pfsearch(Vmalloc_t* vm, const char* file, int line) in pfsearch() argument
78 static Pfobj_t* pfsearch(vm, file, line) in pfsearch()
79 Vmalloc_t* vm; /* region allocating from */ in pfsearch()
101 h = line + (((Vmulong_t)vm)>>4);
106 if(PFLINE(pf) == line && PFVM(pf) == vm && strcmp(PFFILE(pf),file) == 0)
137 if(vm >= PFVM(pfvm))
139 if(!pfvm || PFVM(pfvm) > vm)
153 PFVM(pfvm) = vm;
[all …]
H A Dvmclose.c35 int vmclose(Vmalloc_t* vm) in vmclose() argument
37 int vmclose(vm) in vmclose()
38 Vmalloc_t* vm; in vmclose()
43 Vmdata_t* vd = vm->data;
46 if(vm == Vmheap)
52 if(vm->disc->exceptf &&
53 (ev = (*vm->disc->exceptf)(vm,VM_CLOSE,NIL(Void_t*),vm->disc)) < 0 )
61 (*_Vmpfclose)(vm);
65 { if(v == vm)
77 else (*vm->disc->memoryf)(vm,seg->addr,seg->extent,0,vm->disc);
[all …]
H A Dvmlast.c36 static Void_t* lastalloc(Vmalloc_t* vm, size_t size) in lastalloc() argument
38 static Void_t* lastalloc(vm, size) in lastalloc()
39 Vmalloc_t* vm; in lastalloc()
46 reg Vmdata_t* vd = vm->data;
75 if((tp = (*_Vmextend)(vm,size,NIL(Vmsearch_f))) )
96 (*_Vmtrace)(vm, NIL(Vmuchar_t*), (Vmuchar_t*)tp, orgsize, 0);
100 ANNOUNCE(local, vm, VM_ALLOC, (Void_t*)tp, vm->disc);
106 static int lastfree(Vmalloc_t* vm, reg Void_t* data ) in lastfree() argument
108 static int lastfree(vm, data) in lastfree()
109 Vmalloc_t* vm; in lastfree()
[all …]
H A Dvmprivate.c39 static Block_t* vmextend(reg Vmalloc_t* vm, size_t size, Vmsearch_f searchf ) in vmextend() argument
41 static Block_t* vmextend(vm, size, searchf ) in vmextend()
42 reg Vmalloc_t* vm; /* region to increase in size */ in vmextend()
51 reg Vmdata_t* vd = vm->data;
52 reg Vmemory_f memoryf = vm->disc->memoryf;
53 reg Vmexcept_f exceptf = vm->disc->exceptf;
58 if(!_Vmtrace && vm == Vmheap && (vd->mode&VM_TRUST) )
73 if(size > 2*vd->incr && vm->disc->round < vd->incr)
87 addr = (Vmuchar_t*)(*memoryf)(vm,seg->addr,seg->extent,
88 seg->extent+size-s,vm->disc);
[all …]
H A Dvmopen.c56 reg Vmalloc_t* vm; local
72 if(!(vm = (Vmalloc_t*)vmalloc(Vmheap,sizeof(Vmalloc_t))) )
74 vm->meth = *meth;
75 vm->disc = disc;
76 vm->file = NIL(char*);
77 vm->line = 0;
81 if((e = (*disc->exceptf)(vm,VM_OPEN,(Void_t*)(&addr),disc)) != 0)
92 { vm->data = vd;
97 vmfree(Vmheap,vm);
109 if(!(addr = (Vmuchar_t*)(*memoryf)(vm,NIL(Void_t*),0,s,disc)) )
[all …]
H A Dvmregion.c44 Vmalloc_t *vm; local
51 for(vm = Vmheap; vm; vm = vm->next)
52 if(vm->data == vd)
55 return vm;
H A Dvmgetmem.c43 Void_t* vmgetmem(Vmalloc_t* vm, Void_t* data, size_t size) in vmgetmem() argument
45 Void_t* vmgetmem(vm, data, size) in vmgetmem()
46 Vmalloc_t* vm; in vmgetmem()
51 if (!vm)
54 return vmresize(vm, data, size, VM_RSMOVE|VM_RSCOPY|VM_RSZERO);
55 vmclose(vm);
H A Dvmdisc.c37 Vmdisc_t* vmdisc(Vmalloc_t* vm, Vmdisc_t* disc) in vmdisc() argument
39 Vmdisc_t* vmdisc(vm, disc) in vmdisc()
40 Vmalloc_t* vm; in vmdisc()
44 Vmdisc_t* old = vm->disc;
50 (*old->exceptf)(vm,VM_DISC,(Void_t*)disc,old) != 0 )
52 vm->disc = disc;
H A Dvmhdr.h227 #define ANNOUNCE(lc, vm,ev,dt,dc) \ argument
229 (*(dc)->exceptf)((vm), (ev), (Void_t*)(dt), (dc)) )
233 #define KPVALLOC(vm,sz,func) (SETLOCAL((vm)->data), func((vm),(sz)) ) argument
234 #define KPVALIGN(vm,sz,al,func) (SETLOCAL((vm)->data), func((vm),(sz),(al)) ) argument
235 #define KPVFREE(vm,d,func) (SETLOCAL((vm)->data), func((vm),(d)) ) argument
236 #define KPVRESIZE(vm,d,sz,mv,func) (SETLOCAL((vm)->data), func((vm),(d),(sz),(mv)) ) argument
237 #define KPVADDR(vm,addr,func) (SETLOCAL((vm)->data), func((vm),(addr)) ) argument
238 #define KPVCOMPACT(vm,func) (SETLOCAL((vm)->data), func((vm)) ) argument
385 #define VM(b) (SEG(b)->vm)
417 #define VMFLF(vm,fi,ln,fn) ((fi) = (vm)->file, (vm)->file = NIL(char*), \ argument
[all …]
H A Dvmbest.c557 static int bestcompact(Vmalloc_t* vm) in bestcompact() argument
559 static int bestcompact(vm) in bestcompact()
560 Vmalloc_t* vm; in bestcompact()
567 reg Vmdata_t* vd = vm->data;
596 if((round = vm->disc->round) == 0)
620 if((size = (*_Vmtruncate)(vm,seg,size,0)) > 0)
641 (*_Vmtrace)(vm, (Vmuchar_t*)0, (Vmuchar_t*)0, 0, 0);
650 static Void_t* bestalloc(Vmalloc_t* vm, reg size_t size ) in bestalloc() argument
652 static Void_t* bestalloc(vm,size) in bestalloc()
653 Vmalloc_t* vm; /* region allocating from */ in bestalloc()
[all …]
H A Dmalloc.c903 Vmalloc_t* vm = 0; in _vmoptions() local
1002 if (!vm) in _vmoptions()
1003 vm = vmopen(Vmdcsbrk, Vmdebug, 0); in _vmoptions()
1004 if (vm && vm->meth.meth == VM_MTDEBUG) in _vmoptions()
1005 vmset(vm, VM_DBABORT, 1); in _vmoptions()
1016 if (v && !vm) in _vmoptions()
1021 vm = vmopen(Vmdcsbrk, Vmdebug, 0); in _vmoptions()
1023 vm = vmopen(Vmdcsbrk, Vmprofile, 0); in _vmoptions()
1025 vm = vmopen(Vmdcsbrk, Vmlast, 0); in _vmoptions()
1027 vm = Vmheap; in _vmoptions()
[all …]
H A Dvmmopen.c158 static Void_t* mmvmmemory(Vmalloc_t* vm, Void_t* caddr, in mmvmmemory() argument
161 static Void_t* mmvmmemory(vm, caddr, csize, nsize, disc) in mmvmmemory()
162 Vmalloc_t* vm; in mmvmmemory()
214 static int mmvmexcept(Vmalloc_t* vm, int type, Void_t* data, Vmdisc_t* disc) in mmvmexcept() argument
216 static int mmvmexcept(vm, type, data, disc) in mmvmexcept()
217 Vmalloc_t* vm; in mmvmexcept()
253 Vmalloc_t *vm; local
281 if(!(vm = vmopen(&mmdc->disc, Vmbest, VM_TRUST)) )
286 return vm;
291 Void_t* vmmset(Vmalloc_t* vm, int key, Void_t* data, int set) in vmmset() argument
[all …]
H A Dvmtrace.c100 static void trtrace(Vmalloc_t* vm, in trtrace() argument
103 static void trtrace(vm, oldaddr, newaddr, size, align) in trtrace()
104 Vmalloc_t* vm; /* region call was made from */ in trtrace()
112 Vmdata_t* vd = vm->data;
129 VMFLF(vm,file,line,func);
140 bufp = trstrcpy(bufp, tritoa(VLONG(vm), 0), ':');
247 int vmtrbusy(Vmalloc_t* vm) in vmtrbusy() argument
249 int vmtrbusy(vm) in vmtrbusy()
250 Vmalloc_t* vm; in vmtrbusy()
254 Vmdata_t* vd = vm->data;
[all …]
/titanic_44/usr/src/lib/libast/common/include/
H A Dvmalloc.h199 #define _VM_(vm) ((Vmalloc_t*)(vm)) argument
205 #define _VMFILE_(vm) (_VM_(vm)->file = (char*)__FILE__) argument
207 #define _VMFILE_(vm) (_VM_(vm)->file = 0)
211 #define _VMLINE_(vm) (_VM_(vm)->line = __LINE__) argument
213 #define _VMLINE_(vm) (_VM_(vm)->line = 0)
217 #define _VMFUNC_(vm) (_VM_(vm)->func = (Void_t*)__FUNCTION__) argument
219 #define _VMFUNC_(vm) (_VM_(vm)->func = 0)
222 #define _VMFL_(vm) (_VMFILE_(vm), _VMLINE_(vm), _VMFUNC_(vm)) argument
224 #define vmalloc(vm,sz) (_VMFL_(vm), \ argument
225 (*(_VM_(vm)->meth.allocf))((vm),(sz)) )
[all …]
/titanic_44/usr/src/lib/libast/amd64/include/ast/
H A Dvmalloc.h199 #define _VM_(vm) ((Vmalloc_t*)(vm)) argument
205 #define _VMFILE_(vm) (_VM_(vm)->file = (char*)__FILE__) argument
207 #define _VMFILE_(vm) (_VM_(vm)->file = 0)
211 #define _VMLINE_(vm) (_VM_(vm)->line = __LINE__) argument
213 #define _VMLINE_(vm) (_VM_(vm)->line = 0)
217 #define _VMFUNC_(vm) (_VM_(vm)->func = (Void_t*)__FUNCTION__) argument
219 #define _VMFUNC_(vm) (_VM_(vm)->func = 0)
222 #define _VMFL_(vm) (_VMFILE_(vm), _VMLINE_(vm), _VMFUNC_(vm)) argument
224 #define vmalloc(vm,sz) (_VMFL_(vm), \ argument
225 (*(_VM_(vm)->meth.allocf))((vm),(sz)) )
[all …]
/titanic_44/usr/src/lib/libast/sparcv9/include/ast/
H A Dvmalloc.h199 #define _VM_(vm) ((Vmalloc_t*)(vm)) argument
205 #define _VMFILE_(vm) (_VM_(vm)->file = (char*)__FILE__) argument
207 #define _VMFILE_(vm) (_VM_(vm)->file = 0)
211 #define _VMLINE_(vm) (_VM_(vm)->line = __LINE__) argument
213 #define _VMLINE_(vm) (_VM_(vm)->line = 0)
217 #define _VMFUNC_(vm) (_VM_(vm)->func = (Void_t*)__FUNCTION__) argument
219 #define _VMFUNC_(vm) (_VM_(vm)->func = 0)
222 #define _VMFL_(vm) (_VMFILE_(vm), _VMLINE_(vm), _VMFUNC_(vm)) argument
224 #define vmalloc(vm,sz) (_VMFL_(vm), \ argument
225 (*(_VM_(vm)->meth.allocf))((vm),(sz)) )
[all …]
/titanic_44/usr/src/lib/libast/i386/include/ast/
H A Dvmalloc.h199 #define _VM_(vm) ((Vmalloc_t*)(vm)) argument
205 #define _VMFILE_(vm) (_VM_(vm)->file = (char*)__FILE__) argument
207 #define _VMFILE_(vm) (_VM_(vm)->file = 0)
211 #define _VMLINE_(vm) (_VM_(vm)->line = __LINE__) argument
213 #define _VMLINE_(vm) (_VM_(vm)->line = 0)
217 #define _VMFUNC_(vm) (_VM_(vm)->func = (Void_t*)__FUNCTION__) argument
219 #define _VMFUNC_(vm) (_VM_(vm)->func = 0)
222 #define _VMFL_(vm) (_VMFILE_(vm), _VMLINE_(vm), _VMFUNC_(vm)) argument
224 #define vmalloc(vm,sz) (_VMFL_(vm), \ argument
225 (*(_VM_(vm)->meth.allocf))((vm),(sz)) )
[all …]
/titanic_44/usr/src/lib/libast/sparc/include/ast/
H A Dvmalloc.h199 #define _VM_(vm) ((Vmalloc_t*)(vm)) argument
205 #define _VMFILE_(vm) (_VM_(vm)->file = (char*)__FILE__) argument
207 #define _VMFILE_(vm) (_VM_(vm)->file = 0)
211 #define _VMLINE_(vm) (_VM_(vm)->line = __LINE__) argument
213 #define _VMLINE_(vm) (_VM_(vm)->line = 0)
217 #define _VMFUNC_(vm) (_VM_(vm)->func = (Void_t*)__FUNCTION__) argument
219 #define _VMFUNC_(vm) (_VM_(vm)->func = 0)
222 #define _VMFL_(vm) (_VMFILE_(vm), _VMLINE_(vm), _VMFUNC_(vm)) argument
224 #define vmalloc(vm,sz) (_VMFL_(vm), \ argument
225 (*(_VM_(vm)->meth.allocf))((vm),(sz)) )
[all …]
/titanic_44/usr/src/lib/libcmd/common/
H A Dvmstate.c55 Vmalloc_t* vm; member
75 *pn = integralof(state->vm); in key()
101 visit(Vmalloc_t* vm, void* addr, size_t size, Vmdisc_t* disc, void* handle) in visit() argument
106 if (vm != state->vm) in visit()
108 state->vm = vm; in visit()
110 state->region[state->regions++] = vm; in visit()
157 state.vm = state.region[i]; in b_vmstate()
158 vmstat(state.vm, &state.vs); in b_vmstate()
/titanic_44/usr/src/cmd/mdb/demo/common/
H A Dexample1.c68 vminfo_t vm; in vminfo() local
73 if (mdb_readvar(&vm, "vminfo") == -1) { in vminfo()
83 mdb_printf("%8llu pages of free memory\n", vm.freemem); in vminfo()
84 mdb_printf("%8llu pages of reserved swap\n", vm.swap_resv); in vminfo()
85 mdb_printf("%8llu pages of allocated swap\n", vm.swap_alloc); in vminfo()
86 mdb_printf("%8llu pages of unreserved swap\n", vm.swap_avail); in vminfo()
87 mdb_printf("%8llu pages of unallocated swap\n", vm.swap_free); in vminfo()
/titanic_44/usr/src/lib/libast/common/port/
H A Dmc.c41 Vmalloc_t* vm;
217 Vmalloc_t* vm; in mcopen() local
245 if (!(vm = vmopen(Vmdcheap, Vmbest, 0)) || !(mc = vmnewof(vm, 0, Mc_t, 1, 0))) in mcopen()
250 mc->vm = vm; in mcopen()
258 if (!(sp = sfgetr(ip, 0, 0)) || !(mc->translation = vmstrdup(vm, sp))) in mcopen()
281 else if (!(mc->translation = vmnewof(vm, 0, char, 1, 0))) in mcopen()
288 if (!(mc->set = vmnewof(vm, 0, Mcset_t, mc->num + 1, 0))) in mcopen()
292 if (!(mp = vmnewof(vm, 0, char*, mc->nmsgs + mc->num + 1, 0))) in mcopen()
294 if (!(rp = sp = vmalloc(vm, mc->nstrs + 1))) in mcopen()
335 vmclose(vm); in mcopen()
[all …]
/titanic_44/usr/src/lib/libast/common/cdt/
H A Ddtnew.c34 Vmalloc_t* vm; member
51 return vmresize(((Dc_t*)disc)->vm, addr, size, VM_RSMOVE); in memoryf()
59 dtnew(Vmalloc_t* vm, Dtdisc_t* disc, Dtmethod_t* meth) in dtnew() argument
69 dc.vm = vm; in dtnew()

1234