From 0a5d8f3ae45bd8a10498ef35c1e704983afbbf25 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Wed, 20 Apr 2016 15:57:47 +0200 Subject: erts: Add literal_mmap and exec_mmap to system_info erlang:system_info(allocator) -> {Allocator, Version, Features, Settings} Features includes 'literal_mmap' and/or 'exec_mmap' if they exist. --- erts/emulator/beam/erl_alloc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/erts/emulator/beam/erl_alloc.c b/erts/emulator/beam/erl_alloc.c index 5b76f34165..64a323c434 100644 --- a/erts/emulator/beam/erl_alloc.c +++ b/erts/emulator/beam/erl_alloc.c @@ -2999,7 +2999,12 @@ erts_allocator_options(void *proc) #if ERTS_HAVE_ERTS_SYS_ALIGNED_ALLOC terms[length++] = am_atom_put("sys_aligned_alloc", 17); #endif - +#if defined(ARCH_64) && defined(ERTS_HAVE_OS_PHYSICAL_MEMORY_RESERVATION) + terms[length++] = ERTS_MAKE_AM("literal_mmap"); +#endif +#ifdef ERTS_ALC_A_EXEC + terms[length++] = ERTS_MAKE_AM("exec_mmap"); +#endif features = length ? erts_bld_list(hpp, szp, length, terms) : NIL; #if defined(__GLIBC__) -- cgit v1.2.3