Lines Matching refs:mapsize
52 size_t mapsize = st.st_size; in crc32_file() local
53 void *mapped = mmap (NULL, mapsize, PROT_READ, MAP_PRIVATE, fd, 0); in crc32_file()
57 mapsize = ((mapsize / 2) + pagesize - 1) & -pagesize; in crc32_file()
58 while (mapsize >= pagesize in crc32_file()
59 && (mapped = mmap (NULL, mapsize, PROT_READ, MAP_PRIVATE, in crc32_file()
61 mapsize /= 2; in crc32_file()
67 if (st.st_size <= (off_t) mapsize) in crc32_file()
70 munmap (mapped, mapsize); in crc32_file()
73 crc = crc32 (crc, mapped, mapsize); in crc32_file()
74 off += mapsize; in crc32_file()
75 st.st_size -= mapsize; in crc32_file()
76 } while (mmap (mapped, mapsize, PROT_READ, MAP_FIXED|MAP_PRIVATE, in crc32_file()
78 munmap (mapped, mapsize); in crc32_file()