Added mg_mmap and mg_munmap utility functions for memory mapping  files