summaryrefslogtreecommitdiff
path: root/cont.c
diff options
context:
space:
mode:
authorDavid Carlier <devnexen@gmail.com>2021-03-21 16:46:46 +0000
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-03-22 22:51:15 +0900
commit5e16c3a12a7f7869109fd8b72d7f54db347e5fe5 (patch)
treefd86a2cf69bfa6750bda08bc311192410120c39c /cont.c
parent7e8a9af9db42a21f6a1125a29e98c45ff9d5833b (diff)
downloadruby-5e16c3a12a7f7869109fd8b72d7f54db347e5fe5.tar.gz
solaris/illumos build fix.
Diffstat (limited to 'cont.c')
-rw-r--r--cont.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cont.c b/cont.c
index 4eab72f388..7fbca90079 100644
--- a/cont.c
+++ b/cont.c
@@ -646,6 +646,8 @@ fiber_pool_stack_free(struct fiber_pool_stack * stack)
#if VM_CHECK_MODE > 0 && defined(MADV_DONTNEED)
// This immediately discards the pages and the memory is reset to zero.
madvise(base, size, MADV_DONTNEED);
+#elif defined(POSIX_MADV_DONTNEED)
+ posix_madvise(base, size, POSIX_MADV_DONTNEED);
#elif defined(MADV_FREE_REUSABLE)
madvise(base, size, MADV_FREE_REUSABLE);
#elif defined(MADV_FREE)