FreeBSD/sys/kern/vfs_bio.c
/*
 * vm_hold_load_pages and vm_hold_free_pages get pages into
 * a buffers address space.  The pages are anonymous and are
 * not associated with a file object.
 */
vm_hold_load_pages and vm_hold_free_pages get pages into
a buffers address space.  The pages are anonymous and are
not associated with a file object.
vm_hold_load_pages and vm_hold_free_pages get pages into a buffers address space . The pages are anonymous and are not associated with a file object .
static void
vm_hold_load_pages(struct buf *bp, vm_offset_t from, vm_offset_t to)
{
	vm_offset_t pg;
	vm_page_t p;
	int index;
	BUF_CHECK_MAPPED(bp);
	to = round_page(to);
	from = round_page(from);
	index = (from - trunc_page((vm_offset_t)bp->b_data)) >> PAGE_SHIFT;
	for (pg = from; pg < to; pg += PAGE_SIZE, index++) {
tryagain:
		p = vm_page_alloc(NULL, 0, VM_ALLOC_SYSTEM | VM_ALLOC_NOOBJ |
		    VM_ALLOC_WIRED | VM_ALLOC_COUNT((to - pg) >> PAGE_SHIFT));
		if (p == NULL) {
			VM_WAIT;
			goto tryagain;
		}
		pmap_qenter(pg, &p, 1);
		bp->b_pages[index] = p;
	}
	bp->b_npages = index;
}
static void vm_hold_load_pages ( struct buf * bp , vm_offset_t from , vm_offset_t to ) { vm_offset_t pg ; vm_page_t p ; int index ; BUF_CHECK_MAPPED ( bp ) ; to = round_page ( to ) ; from = round_page ( from ) ; index = ( from - trunc_page ( ( vm_offset_t ) bp -> b_data ) ) >> PAGE_SHIFT ; for ( pg = from ; pg < to ; pg += PAGE_SIZE , index ++ ) { tryagain : p = vm_page_alloc ( NULL , 0 , VM_ALLOC_SYSTEM | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | VM_ALLOC_COUNT ( ( to - pg ) >> PAGE_SHIFT ) ) ; if ( p == NULL ) { VM_WAIT ; goto tryagain ; } pmap_qenter ( pg , & p , 1 ) ; bp -> b_pages [ index ] = p ; } bp -> b_npages = index ; }
vm_hold_load_pages and vm_hold_free_pages get pages into
 a buffers address space.
vm_hold_load_pages and vm_hold_free_pages get pages into a buffers address space .
/*
		 * note: must allocate system pages since blocking here
		 * could interfere with paging I/O, no matter which
		 * process we are.
		 */