clean up by using python mmap module