Lines Matching refs:mapsize
51 size_t mapsize = st.st_size; in crc32_file() local
52 void *mapped = mmap (NULL, mapsize, PROT_READ, MAP_PRIVATE, fd, 0); in crc32_file()
56 mapsize = ((mapsize / 2) + pagesize - 1) & -pagesize; in crc32_file()
57 while (mapsize >= pagesize in crc32_file()
58 && (mapped = mmap (NULL, mapsize, PROT_READ, MAP_PRIVATE, in crc32_file()
60 mapsize /= 2; in crc32_file()
66 if (st.st_size <= (off_t) mapsize) in crc32_file()
69 munmap (mapped, mapsize); in crc32_file()
72 crc = crc32 (crc, mapped, mapsize); in crc32_file()
73 off += mapsize; in crc32_file()
74 st.st_size -= mapsize; in crc32_file()
75 } while (mmap (mapped, mapsize, PROT_READ, MAP_FIXED|MAP_PRIVATE, in crc32_file()
77 munmap (mapped, mapsize); in crc32_file()