- let fd = unsafe {
- let fd = path.with_c_str(|path| {
- open(path, O_CREAT | O_RDWR | O_TRUNC, S_IRUSR | S_IWUSR)
- });
- lseek_(fd, size);
- "x".with_c_str(|x| assert!(write(fd, x as *const c_void, 1) == 1));
- fd
- };
- let chunk = match MemoryMap::new(size / 2, &[