Lines Matching refs:file_map
67 static void *file_map; /* pointer of the mapped file */ variable
86 munmap(file_map, sb.st_size); in cleanup()
88 free(file_map); in cleanup()
89 file_map = NULL; in cleanup()
117 file_ptr = file_map + offset; in ulseek()
123 file_ptr = file_map + (sb.st_size - offset); in ulseek()
126 if (file_ptr < file_map) { in ulseek()
130 return file_ptr - file_map; in ulseek()
260 file_map = mmap(0, sb.st_size, PROT_READ|PROT_WRITE, MAP_PRIVATE, in mmap_file()
263 if (file_map == MAP_FAILED) { in mmap_file()
265 file_map = umalloc(sb.st_size); in mmap_file()
266 uread(fd_map, file_map, sb.st_size); in mmap_file()
270 file_end = file_map + sb.st_size; in mmap_file()
272 return file_map; in mmap_file()
295 n = write(fd_map, file_map, sb.st_size); in write_file()
607 file_map = NULL; in main()