mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-06 22:24:13 +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;
|
struct radvisory hint;
|
||||||
hint.ra_offset = 0;
|
hint.ra_offset = 0;
|
||||||
hint.ra_count = usedsize;
|
hint.ra_count = usedsize;
|
||||||
if (unlikely(fcntl(env->me_fd, F_RDADVISE, &hint) == -1))
|
(void)/* Ignore ENOTTY for DB on the ram-disk and so on */ fcntl(
|
||||||
return errno;
|
env->me_fd, F_RDADVISE, &hint);
|
||||||
#endif
|
#endif
|
||||||
#if defined(MADV_WILLNEED)
|
#if defined(MADV_WILLNEED)
|
||||||
if (unlikely(madvise(env->me_map, usedsize, MADV_WILLNEED) != 0))
|
if (unlikely(madvise(env->me_map, usedsize, MADV_WILLNEED) != 0))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user