if (vm_physmem[lcv].pgs)
if (uvm.page_init_done == TRUE)
uvm_page_physget(paddrp)	paddr_t *paddrp;{	int lcv, x;	/* pass 1: try allocating from a matching end */#if (VM_PHYSSEG_STRAT == VM_PSTRAT_BIGFIRST) || \	(VM_PHYSSEG_STRAT == VM_PSTRAT_BSEARCH)	for (lcv = vm_nphysseg - 1 ; lcv >= 0 ; lcv--)#else	for (lcv = 0 ; lcv < vm_nphysseg ; lcv++)#endif	{		if (vm_physmem[lcv].pgs)			panic("vm_page_physget: called _after_ bootstrap");		/* try from front */		if (vm_physmem[lcv].avail_start == vm_physmem[lcv].start &&		    vm_physmem[lcv].avail_start < vm_physmem[lcv].avail_end) {			*paddrp = ptoa(vm_physmem[lcv].avail_start);			vm_physmem[lcv].avail_start++;			vm_physmem[lcv].start++;			/* nothing left?   nuke it */			if (vm_physmem[lcv].avail_start ==			    vm_physmem[lcv].end) {				if (vm_nphysseg == 1)				    panic("vm_page_physget: out of memory!");				vm_nphysseg--;				for (x = lcv ; x < vm_nphysseg ; x++)					/* structure copy */					vm_physmem[x] = vm_physmem[x+1];			}			return (TRUE);		}		/* try from rear */		if (vm_physmem[lcv].avail_end == vm_physmem[lcv].end &&		    vm_physmem[lcv].avail_start < vm_physmem[lcv].avail_end) {			*paddrp = ptoa(vm_physmem[lcv].avail_end - 1);			vm_physmem[lcv].avail_end--;			vm_physmem[lcv].end--;			/* nothing left?   nuke it */			if (vm_physmem[lcv].avail_end ==			    vm_physmem[lcv].start) {				if (vm_nphysseg == 1)				    panic("vm_page_physget: out of memory!");				vm_nphysseg--;				for (x = lcv ; x < vm_nphysseg ; x++)					/* structure copy */					vm_physmem[x] = vm_physmem[x+1];			}			return (TRUE);		}	}	/* pass2: forget about matching ends, just allocate something */#if (VM_PHYSSEG_STRAT == VM_PSTRAT_BIGFIRST) || \	(VM_PHYSSEG_STRAT == VM_PSTRAT_BSEARCH)	for (lcv = vm_nphysseg - 1 ; lcv >= 0 ; lcv--)#else	for (lcv = 0 ; lcv < vm_nphysseg ; lcv++)#endif	{		/* any room in this bank? */		if (vm_physmem[lcv].avail_start >= vm_physmem[lcv].avail_end)			continue;  /* nope */		*paddrp = ptoa(vm_physmem[lcv].avail_start);		vm_physmem[lcv].avail_start++;		/* truncate! */		vm_physmem[lcv].start = vm_physmem[lcv].avail_start;		/* nothing left?   nuke it */		if (vm_physmem[lcv].avail_start == vm_physmem[lcv].end) {			if (vm_nphysseg == 1)				panic("vm_page_physget: out of memory!");			vm_nphysseg--;			for (x = lcv ; x < vm_nphysseg ; x++)				/* structure copy */				vm_physmem[x] = vm_physmem[x+1];		}		return (TRUE);	}	return (FALSE);        /* whoops! */}