Lines Matching refs:mapsize
67 size_t mapsize = st.st_size; in crc32_file() local
68 void *mapped = mmap (NULL, mapsize, PROT_READ, MAP_PRIVATE, fd, 0); in crc32_file()
72 mapsize = ((mapsize / 2) + pagesize - 1) & -pagesize; in crc32_file()
73 while (mapsize >= pagesize in crc32_file()
74 && (mapped = mmap (NULL, mapsize, PROT_READ, MAP_PRIVATE, in crc32_file()
76 mapsize /= 2; in crc32_file()
82 if (st.st_size <= (off_t) mapsize) in crc32_file()
85 munmap (mapped, mapsize); in crc32_file()
88 crc = crc32 (crc, mapped, mapsize); in crc32_file()
89 off += mapsize; in crc32_file()
90 st.st_size -= mapsize; in crc32_file()
91 } while (mmap (mapped, mapsize, PROT_READ, MAP_FIXED|MAP_PRIVATE, in crc32_file()
93 munmap (mapped, mapsize); in crc32_file()