Lines Matching refs:npages
309 rd_phys_alloc(pgcnt_t npages) in rd_phys_alloc() argument
317 if (rd_tot_physmem + npages > rd_max_physmem) in rd_phys_alloc()
320 if (!page_resv(npages, KM_NOSLEEP)) in rd_phys_alloc()
323 if (!page_create_wait(npages, 0)) { in rd_phys_alloc()
324 page_unresv(npages); in rd_phys_alloc()
328 ppalen = npages * sizeof (struct page_t *); in rd_phys_alloc()
331 page_create_putback(npages); in rd_phys_alloc()
332 page_unresv(npages); in rd_phys_alloc()
337 for (i = 0, addr = NULL; i < npages; ++i, addr += PAGESIZE) { in rd_phys_alloc()
352 for (i = 0; i < npages; i++) in rd_phys_alloc()
354 rd_tot_physmem += npages; in rd_phys_alloc()
359 ASSERT(i < npages); in rd_phys_alloc()
360 page_create_putback(npages - i); in rd_phys_alloc()
364 page_unresv(npages); in rd_phys_alloc()
375 rd_phys_free(page_t **ppa, pgcnt_t npages) in rd_phys_free() argument
378 size_t ppalen = npages * sizeof (struct page_t *); in rd_phys_free()
380 for (i = 0; i < npages; ++i) { in rd_phys_free()
391 page_unresv(npages); in rd_phys_free()
392 rd_tot_physmem -= npages; in rd_phys_free()