From a168c4772827bc6105177c4b605dcf6e6e1943a5 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 14 May 2021 09:31:09 +0900 Subject: Make USE_MMAP_ALIGNED_ALLOC static const --- gc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gc.c') diff --git a/gc.c b/gc.c index c98aaee4d3..365210b377 100644 --- a/gc.c +++ b/gc.c @@ -858,10 +858,10 @@ enum { #ifdef HAVE_MMAP # 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) +static const bool 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 +static const bool USE_MMAP_ALIGNED_ALLOC = true; # else /* Otherwise, fall back to determining if we can use mmap during runtime. */ # define USE_MMAP_ALIGNED_ALLOC (use_mmap_aligned_alloc != false) @@ -869,7 +869,7 @@ enum { static bool use_mmap_aligned_alloc; # endif #else -# define USE_MMAP_ALIGNED_ALLOC 0 +static const bool USE_MMAP_ALIGNED_ALLOC = false; #endif struct heap_page { -- cgit v1.2.3