next up previous contents index
Next: 10.9.15 pdir_dump: dump the Up: (X86) Base Environment: Page Previous: 10.9.13 pdir_unmap_range: remove a

10.9.14 pdir_clean_range: free unused page table pages in a page directory

   

SYNOPSIS

#include <oskit/x86/base_paging.h>

void pdir_clean_range(oskit_addr_t pdir_pa, oskit_addr_t la, oskit_size_t size);

DESCRIPTION

This function scans the portion of the given page directory covering the given address range, looking for associated page table pages that are unnecessary and frees them. ``Unnecessary'' page table pages are those which contain only entries for which INTEL_PTE_VALID is not set. These pages are freed with ptab_free and the corresponding page directory entries marked as invalid.

PARAMETERS

pdir_pa
Physical address of the page directory.
la
Starting linear address of the region to clean. Must be page-aligned.
size
Size (in bytes) of the region to clean. The value passed is rounded up to whole pages. Use ``0'' for la and `` (oskit_addr_t)0'' for size to clean the entire page directory.

DEPENDENCIES

pdir_find_pde
10.9.3
ptab_find_pte
10.9.4
ptab_free
10.9.8



University of Utah Flux Research Group