Home
last modified time | relevance | path

Searched refs:mmap_ptr (Results 1 – 2 of 2) sorted by relevance

/external/fio/engines/
Dmmap.c26 void *mmap_ptr; member
47 fmd->mmap_ptr = mmap(NULL, length, flags, MAP_SHARED, f->fd, off); in fio_mmap_file()
48 if (fmd->mmap_ptr == MAP_FAILED) { in fio_mmap_file()
49 fmd->mmap_ptr = NULL; in fio_mmap_file()
55 if (posix_madvise(fmd->mmap_ptr, length, POSIX_MADV_SEQUENTIAL) < 0) { in fio_mmap_file()
60 if (posix_madvise(fmd->mmap_ptr, length, POSIX_MADV_RANDOM) < 0) { in fio_mmap_file()
65 if (posix_madvise(fmd->mmap_ptr, length, POSIX_MADV_DONTNEED) < 0) { in fio_mmap_file()
72 (void) posix_madvise(fmd->mmap_ptr, fmd->mmap_sz, FIO_MADV_FREE); in fio_mmap_file()
77 if (td->error && fmd->mmap_ptr) in fio_mmap_file()
78 munmap(fmd->mmap_ptr, length); in fio_mmap_file()
[all …]
/external/vboot_reference/futility/
Dmisc.c237 void *mmap_ptr; in futil_map_file() local
259 mmap_ptr = mmap(0, sb.st_size, in futil_map_file()
262 mmap_ptr = mmap(0, sb.st_size, in futil_map_file()
265 if (mmap_ptr == (void *)-1) { in futil_map_file()
272 *buf = (uint8_t *)mmap_ptr; in futil_map_file()
280 void *mmap_ptr = buf; in futil_unmap_file() local
284 (0 != msync(mmap_ptr, len, MS_SYNC|MS_INVALIDATE))) { in futil_unmap_file()
289 if (0 != munmap(mmap_ptr, len)) { in futil_unmap_file()