mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-15 21:27:18 +03:00
Pages: Statically detect if pages_huge may succeed
This commit is contained in:
parent
c1b2a77933
commit
63677dde63
1 changed files with 12 additions and 0 deletions
|
|
@ -58,6 +58,18 @@ static const bool pages_can_purge_forced =
|
|||
#endif
|
||||
;
|
||||
|
||||
#if defined(JEMALLOC_HAVE_MADVISE_HUGE) || defined(JEMALLOC_HAVE_MEMCNTL)
|
||||
# define PAGES_CAN_HUGIFY
|
||||
#endif
|
||||
|
||||
static const bool pages_can_hugify =
|
||||
#ifdef PAGES_CAN_HUGIFY
|
||||
true
|
||||
#else
|
||||
false
|
||||
#endif
|
||||
;
|
||||
|
||||
typedef enum {
|
||||
thp_mode_default = 0, /* Do not change hugepage settings. */
|
||||
thp_mode_always = 1, /* Always set MADV_HUGEPAGE. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue