Index: sys/vm/vm_phys.h =================================================================== --- sys/vm/vm_phys.h +++ sys/vm/vm_phys.h @@ -71,7 +71,6 @@ vm_memattr_t memattr); void vm_phys_fictitious_unreg_range(vm_paddr_t start, vm_paddr_t end); vm_page_t vm_phys_fictitious_to_vm_page(vm_paddr_t pa); -void vm_phys_free_contig(vm_page_t m, u_long npages); void vm_phys_free_pages(vm_page_t m, int order); void vm_phys_init(void); vm_page_t vm_phys_paddr_to_vm_page(vm_paddr_t pa); Index: sys/vm/vm_phys.c =================================================================== --- sys/vm/vm_phys.c +++ sys/vm/vm_phys.c @@ -1201,39 +1201,6 @@ } } -/* - * Free a contiguous, arbitrarily sized set of physical pages. - * - * The free page queues must be locked. - */ -void -vm_phys_free_contig(vm_page_t m, u_long npages) -{ - int order_start, order_end; - vm_page_t m_start, m_end; - - vm_domain_free_assert_locked(vm_pagequeue_domain(m)); - - m_start = m; - order_start = max_order(m_start); - if (order_start < VM_NFREEORDER - 1) - m_start += 1 << order_start; - m_end = m + npages; - order_end = max_order(m_end); - if (order_end < VM_NFREEORDER - 1) - m_end -= 1 << order_end; - /* - * Avoid unnecessary coalescing by freeing the pages at the start and - * end of the range last. - */ - if (m_start < m_end) - vm_phys_enqueue_contig(m_start, m_end - m_start); - if (order_start < VM_NFREEORDER - 1) - vm_phys_free_pages(m, order_start); - if (order_end < VM_NFREEORDER - 1) - vm_phys_free_pages(m_end, order_end); -} - /* * Scan physical memory between the specified addresses "low" and "high" for a * run of contiguous physical pages that satisfy the specified conditions, and