Lines Matching refs:pagesize
48 ctx.pagesize = get_page_size(); in alloc_meta()
53 size_t pagesize = PGSZ; in alloc_meta() local
54 if (pagesize < 4096) pagesize = 4096; in alloc_meta()
59 uintptr_t new = ctx.brk + pagesize; in alloc_meta()
66 ctx.brk += -ctx.brk & (pagesize-1); in alloc_meta()
67 new = ctx.brk + 2*pagesize; in alloc_meta()
72 if (need_guard) mmap((void *)ctx.brk, pagesize, in alloc_meta()
75 ctx.avail_meta_areas = (void *)(new - pagesize); in alloc_meta()
76 ctx.avail_meta_area_count = pagesize>>12; in alloc_meta()
82 p = mmap(0, n*pagesize, PROT_NONE, in alloc_meta()
85 ctx.avail_meta_areas = p + pagesize; in alloc_meta()
86 ctx.avail_meta_area_count = (n-1)*(pagesize>>12); in alloc_meta()
90 if ((uintptr_t)p & (pagesize-1)) need_unprotect = 0; in alloc_meta()
92 if (mprotect(p, pagesize, PROT_READ|PROT_WRITE) in alloc_meta()
182 size_t pagesize = PGSZ; in alloc_group() local
206 if (cnt==1 && size*cnt+UNIT <= pagesize/2) cnt = 2; in alloc_group()
210 if (size*cnt+UNIT > pagesize/2) { in alloc_group()
229 else if ((sc&3)==1 && size*cnt>8*pagesize) cnt = 2; in alloc_group()
230 else if ((sc&3)==2 && size*cnt>4*pagesize) cnt = 3; in alloc_group()
231 else if ((sc&3)==0 && size*cnt>8*pagesize) cnt = 3; in alloc_group()
232 else if ((sc&3)==0 && size*cnt>2*pagesize) cnt = 5; in alloc_group()
235 needed += -needed & (pagesize-1); in alloc_group()
242 req += -req & (pagesize-1); in alloc_group()
243 if (req<size+UNIT || (req>=4*pagesize && 2*cnt>usage)) { in alloc_group()