mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-02 00:04:12 +08:00
mdbx-osx: ignore fcntl(F_RDADVISE) error (RAM-disk, etc).
This commit is contained in:
parent
7fc4c4fccb
commit
a55cffaae8
@ -5977,8 +5977,8 @@ static int __cold mdbx_env_map(MDBX_env *env, const int is_exclusive,
|
||||
struct radvisory hint;
|
||||
hint.ra_offset = 0;
|
||||
hint.ra_count = usedsize;
|
||||
if (unlikely(fcntl(env->me_fd, F_RDADVISE, &hint) == -1))
|
||||
return errno;
|
||||
(void)/* Ignore ENOTTY for DB on the ram-disk and so on */ fcntl(
|
||||
env->me_fd, F_RDADVISE, &hint);
|
||||
#endif
|
||||
#if defined(MADV_WILLNEED)
|
||||
if (unlikely(madvise(env->me_map, usedsize, MADV_WILLNEED) != 0))
|
||||
|
Loading…
x
Reference in New Issue
Block a user