ruby-changes:66065
From: Nobuyoshi <ko1@a...>
Date: Thu, 6 May 2021 11:40:28 +0900 (JST)
Subject: [ruby-changes:66065] 0dd9ac7721 (master): Revised PAGE_MAX_SIZE case
https://git.ruby-lang.org/ruby.git/commit/?id=0dd9ac7721 From 0dd9ac7721fe2754670b7b30aaed33e95f6ca7d1 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Thu, 6 May 2021 11:38:14 +0900 Subject: Revised PAGE_MAX_SIZE case --- gc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gc.c b/gc.c index 90446d1..a1ed084 100644 --- a/gc.c +++ b/gc.c @@ -839,6 +839,9 @@ enum { https://github.com/ruby/ruby/blob/trunk/gc.c#L839 # if HAVE_CONST_PAGE_SIZE /* If we have the HEAP_PAGE and it is a constant, then we can directly use it. */ # define USE_MMAP_ALIGNED_ALLOC (PAGE_SIZE <= HEAP_PAGE_SIZE) +# elif defined(PAGE_MAX_SIZE) && (PAGE_MAX_SIZE <= HEAP_PAGE_SIZE) +/* PAGE_SIZE <= HEAP_PAGE_SIZE */ +# define USE_MMAP_ALIGNED_ALLOC 1 # else /* Otherwise, fall back to determining if we can use mmap during runtime. */ # define USE_MMAP_ALIGNED_ALLOC (use_mmap_aligned_alloc != false) @@ -3210,7 +3213,7 @@ Init_heap(void) https://github.com/ruby/ruby/blob/trunk/gc.c#L3213 { rb_objspace_t *objspace = &rb_objspace; -#if defined(HAVE_MMAP) && !HAVE_CONST_PAGE_SIZE +#if defined(HAVE_MMAP) && !HAVE_CONST_PAGE_SIZE && !defined(PAGE_MAX_SIZE) /* Need to determine if we can use mmap at runtime. */ # ifdef PAGE_SIZE /* If the PAGE_SIZE macro can be used. */ -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/