merge JeffR's patch for defragmenting physical memory