diff options
author | jake <jake@FreeBSD.org> | 2003-03-17 03:16:00 +0000 |
---|---|---|
committer | jake <jake@FreeBSD.org> | 2003-03-17 03:16:00 +0000 |
commit | 17dd501c20f0cfd9bb1b2baedc85b00830d6d439 (patch) | |
tree | e68534a46c62a836d68b5e48dc4e382345d4bc94 /sys/vm | |
parent | f1bbc8cde6bd02cdf1742f706b0f4915fc5cec65 (diff) | |
download | FreeBSD-src-17dd501c20f0cfd9bb1b2baedc85b00830d6d439.zip FreeBSD-src-17dd501c20f0cfd9bb1b2baedc85b00830d6d439.tar.gz |
Subtract the memory that backs the vm_page structures from phys_avail
after mapping it. This makes it possible to determine if a physical
page has a backing vm_page or not.
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_page.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 0f0ef50..102dc6e 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -245,6 +245,7 @@ vm_page_startup(vm_offset_t starta, vm_offset_t enda, vm_offset_t vaddr) mapped = pmap_map(&vaddr, new_end, end, VM_PROT_READ | VM_PROT_WRITE); vm_page_array = (vm_page_t) mapped; + phys_avail[biggestone + 1] = new_end; /* * Clear all of the page structures @@ -262,10 +263,7 @@ vm_page_startup(vm_offset_t starta, vm_offset_t enda, vm_offset_t vaddr) cnt.v_free_count = 0; for (i = 0; phys_avail[i + 1] && npages > 0; i += 2) { pa = phys_avail[i]; - if (i == biggestone) - last_pa = new_end; - else - last_pa = phys_avail[i + 1]; + last_pa = phys_avail[i + 1]; while (pa < last_pa && npages-- > 0) { vm_pageq_add_new_page(pa); pa += PAGE_SIZE; |