Lines Matching refs:npages
206 arena_avail_adjac_succ(arena_chunk_t *chunk, size_t pageind, size_t npages)
210 if (pageind+npages == chunk_npages)
213 assert(pageind+npages < chunk_npages);
214 ret = (arena_mapbits_allocated_get(chunk, pageind+npages) == 0);
216 != arena_mapbits_dirty_get(chunk, pageind+npages));
222 arena_avail_adjac(arena_chunk_t *chunk, size_t pageind, size_t npages)
226 arena_avail_adjac_succ(chunk, pageind, npages));
231 size_t npages, bool maybe_adjac_pred, bool maybe_adjac_succ)
234 assert(npages == (arena_mapbits_unallocated_size_get(chunk, pageind) >>
246 if (maybe_adjac_succ && arena_avail_adjac_succ(chunk, pageind, npages))
252 arena->ndirty += npages;
253 chunk->ndirty += npages;
264 size_t npages, bool maybe_adjac_pred, bool maybe_adjac_succ)
267 assert(npages == (arena_mapbits_unallocated_size_get(chunk, pageind) >>
279 if (maybe_adjac_succ && arena_avail_adjac_succ(chunk, pageind, npages))
286 arena->ndirty -= npages;
287 chunk->ndirty -= npages;
344 arena_run_zero(arena_chunk_t *chunk, size_t run_ind, size_t npages)
348 (run_ind << LG_PAGE)), (npages << LG_PAGE));
350 (npages << LG_PAGE));
926 size_t pageind, npages;
933 for (pageind = map_bias; pageind < chunk_npages; pageind += npages) {
939 npages = run_size >> LG_PAGE;
940 assert(pageind + npages <= chunk_npages);
942 arena_mapbits_dirty_get(chunk, pageind+npages-1));
946 npages))) {
959 npages = arena_mapbits_large_size_get(chunk,
971 npages = bin_info->run_size >> LG_PAGE;
984 size_t npurged, pageind, npages, nmadvise;
996 npages = arena_mapbits_large_size_get(chunk, pageind) >>
998 assert(pageind + npages <= chunk_npages);
1000 LG_PAGE)), (npages << LG_PAGE));
1012 for (i = 0; i < npages; i++) {
1016 npurged += npages;
1897 size_t npages, run_ind, past;
1909 npages = bin_info->run_size >> LG_PAGE;
1923 arena_mapbits_dirty_get(chunk, run_ind+npages-1));
1925 npages) {
1927 assert(npages > 0);
1929 arena_mapbits_large_set(chunk, run_ind+npages-1, 0, 0);
1930 arena_run_trim_tail(arena, chunk, run, (npages << LG_PAGE),
1932 /* npages = past - run_ind; */
2110 size_t npages = oldsize >> LG_PAGE;
2118 if (pageind + npages < chunk_npages &&
2119 arena_mapbits_allocated_get(chunk, pageind+npages) == 0 &&
2121 pageind+npages)) >= size - oldsize) {
2131 ((pageind+npages) << LG_PAGE)), splitsize, zero);
2134 npages = size >> LG_PAGE;
2145 arena_mapbits_dirty_get(chunk, pageind+npages-1);
2147 arena_mapbits_large_set(chunk, pageind+npages-1, 0, flag_dirty);