change the page dirtying code to use function pointers.