size = round_page(size);  #if defined(PMAP_STEAL_MEMORY)    addr = pmap_steal_memory(size, &virtual_space_start, &virtual_space_end);  return(addr);  #else
uvm_pageboot_alloc(size)	vsize_t size;{	static boolean_t initialized = FALSE;	vaddr_t addr;#if !defined(PMAP_STEAL_MEMORY)	vaddr_t vaddr;	paddr_t paddr;#endif	/*	 * on first call to this function, initialize ourselves.	 */	if (initialized == FALSE) {		pmap_virtual_space(&virtual_space_start, &virtual_space_end);		/* round it the way we like it */		virtual_space_start = round_page(virtual_space_start);		virtual_space_end = trunc_page(virtual_space_end);		initialized = TRUE;	}	/* round to page size */	size = round_page(size);#if defined(PMAP_STEAL_MEMORY)	/*	 * defer bootstrap allocation to MD code (it may want to allocate	 * from a direct-mapped segment).  pmap_steal_memory should adjust	 * virtual_space_start/virtual_space_end if necessary.	 */	addr = pmap_steal_memory(size, &virtual_space_start,	    &virtual_space_end);	return(addr);#else /* !PMAP_STEAL_MEMORY */	/*	 * allocate virtual memory for this request	 */	if (virtual_space_start == virtual_space_end ||	    (virtual_space_end - virtual_space_start) < size)		panic("uvm_pageboot_alloc: out of virtual space");	addr = virtual_space_start;#ifdef PMAP_GROWKERNEL	/*	 * If the kernel pmap can't map the requested space,	 * then allocate more resources for it.	 */	if (uvm_maxkaddr < (addr + size)) {		uvm_maxkaddr = pmap_growkernel(addr + size);		if (uvm_maxkaddr < (addr + size))			panic("uvm_pageboot_alloc: pmap_growkernel() failed");	}#endif	virtual_space_start += size;	/*	 * allocate and mapin physical pages to back new virtual pages	 */	for (vaddr = round_page(addr) ; vaddr < addr + size ;	    vaddr += PAGE_SIZE) {		if (!uvm_page_physget(&paddr))			panic("uvm_pageboot_alloc: out of memory");		/*		 * Note this memory is no longer managed, so using		 * pmap_kenter is safe.		 */		pmap_kenter_pa(vaddr, paddr, VM_PROT_READ|VM_PROT_WRITE);	}	pmap_update(pmap_kernel());	return(addr);#endif	/* PMAP_STEAL_MEMORY */}