Lines Matching refs:size
17 int create_tmp_file(char *filename, off_t size) { in create_tmp_file() argument
40 if (ftruncate(fd, size)) { in create_tmp_file()
45 buf = mmap(NULL, size, PROT_WRITE, MAP_SHARED, fd, 0); in create_tmp_file()
51 rc = read(urandom, buf, size); in create_tmp_file()
58 if (rc != size) { in create_tmp_file()
63 if (madvise(buf, size, MADV_DONTNEED)) { in create_tmp_file()
73 rc = posix_fadvise(fd, 0, size, POSIX_FADV_DONTNEED); in create_tmp_file()
79 munmap(buf, size); in create_tmp_file()
84 munmap(buf, size); in create_tmp_file()
95 unsigned char *alloc_mincore_vec(size_t size) { in alloc_mincore_vec() argument
98 vec = malloc(mincore_vec_len(size)); in alloc_mincore_vec()
106 bool check_caching(void *buf, unsigned char *vec, size_t size, bool is_cached) { in check_caching() argument
110 if (mincore(buf, size, vec)) { in check_caching()
116 for (i = 0; i < mincore_vec_len(size); i++) { in check_caching()
123 for (i = 0; i < mincore_vec_len(size); i++) { in check_caching()