-#ifdef FIO_HAVE_FALLOCATE
- {
- int ret;
-
- ret = posix_fallocate(fd, 0, alloc_size);
- if (ret > 0) {
- fprintf(stderr, "posix_fallocate pool file failed: %s\n", strerror(ret));
- goto out_unlink;
- }
- }
-#endif
-
- if (ftruncate(fd, alloc_size) < 0)
- goto out_unlink;
-
- ptr = mmap(NULL, alloc_size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
+ ptr = mmap(NULL, alloc_size, PROT_READ|PROT_WRITE,
+ MAP_SHARED | OS_MAP_ANON, -1, 0);