move the anon mmap code out to its own subroutine.