Fix os-test and change mmap size type to size_t