ruby-changes:66060
From: Nobuyoshi <ko1@a...>
Date: Thu, 6 May 2021 01:03:07 +0900 (JST)
Subject: [ruby-changes:66060] 1921500511 (master): PAGE_SIZE is used only when mmap is available
https://git.ruby-lang.org/ruby.git/commit/?id=1921500511 From 192150051144c0242ee44df26952dfe31b83cac2 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Thu, 6 May 2021 00:29:20 +0900 Subject: PAGE_SIZE is used only when mmap is available --- gc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gc.c b/gc.c index ee9fa49..c899228 100644 --- a/gc.c +++ b/gc.c @@ -834,7 +834,11 @@ enum { https://github.com/ruby/ruby/blob/trunk/gc.c#L834 #define HEAP_PAGE_SIZE HEAP_PAGE_ALIGN #ifdef USE_MMAP_ALIGNED_ALLOC # define Init_use_mmap_aligned_alloc() (void)0 +#elif !defined(HAVE_MMAP) +# define USE_MMAP_ALIGNED_ALLOC 0 +# define Init_use_mmap_aligned_alloc() (void)0 #elif defined(PAGE_MAX_SIZE) && (PAGE_MAX_SIZE <= HEAP_PAGE_SIZE) +/* PAGE_SIZE <= HEAP_PAGE_SIZE */ # define USE_MMAP_ALIGNED_ALLOC 1 # define Init_use_mmap_aligned_alloc() (void)0 #else -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/