Exemple #1
0
static void
dev_pager_free_page(vm_object_t object, vm_page_t m)
{

	VM_OBJECT_ASSERT_WLOCKED(object);
	KASSERT((object->type == OBJT_DEVICE &&
	    (m->oflags & VPO_UNMANAGED) != 0),
	    ("Managed device or page obj %p m %p", object, m));
	TAILQ_REMOVE(&object->un_pager.devp.devp_pglist, m, pageq);
	vm_page_putfake(m);
}
Exemple #2
0
static void
sg_pager_dealloc(vm_object_t object)
{
	struct sglist *sg;
	vm_page_t m;

	/*
	 * Free up our fake pages.
	 */
	while ((m = TAILQ_FIRST(&object->un_pager.sgp.sgp_pglist)) != 0) {
		TAILQ_REMOVE(&object->un_pager.sgp.sgp_pglist, m, plinks.q);
		vm_page_putfake(m);
	}
	
	sg = object->handle;
	sglist_free(sg);
}