diff options
author | Nobuyoshi Nakada <[email protected]> | 2021-05-06 11:38:14 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2021-05-06 11:39:58 +0900 |
commit | 0dd9ac7721fe2754670b7b30aaed33e95f6ca7d1 (patch) | |
tree | 9591e1f3c0a1b02d30f0c6a7554d50d727d422be /gc.c | |
parent | a1fdc5f71cf0ad8254282e34b2a8b7dce11722ba (diff) |
Revised PAGE_MAX_SIZE case
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -839,6 +839,9 @@ enum { # 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) { 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. */ |