diff options
author | Sverker Eriksson <[email protected]> | 2016-05-04 17:44:07 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2016-05-04 18:55:46 +0200 |
commit | dd5087bf582bba0879fa352bdc0ddcbf06d943d2 (patch) | |
tree | e9c0958a8541095a07e3a85b715d04f00b0a5efc /erts/emulator/sys/common/erl_mmap.h | |
parent | 067c234829144dd1c33b9640cd6a0e5faf3d04b3 (diff) | |
download | otp-dd5087bf582bba0879fa352bdc0ddcbf06d943d2.tar.gz otp-dd5087bf582bba0879fa352bdc0ddcbf06d943d2.tar.bz2 otp-dd5087bf582bba0879fa352bdc0ddcbf06d943d2.zip |
erts: Add macro HAVE_ERTS_MMAP
and make erts_mmap unavailable at compile time
if not supported.
Diffstat (limited to 'erts/emulator/sys/common/erl_mmap.h')
-rw-r--r-- | erts/emulator/sys/common/erl_mmap.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/erts/emulator/sys/common/erl_mmap.h b/erts/emulator/sys/common/erl_mmap.h index 3790f2c94e..7ac61a82c1 100644 --- a/erts/emulator/sys/common/erl_mmap.h +++ b/erts/emulator/sys/common/erl_mmap.h @@ -50,6 +50,13 @@ # define ERTS_HAVE_OS_MMAP 1 #endif +#ifdef ERTS_HAVE_GENUINE_OS_MMAP +# define HAVE_ERTS_MMAP 1 +#else +# define HAVE_ERTS_MMAP 0 +#endif + + extern UWord erts_page_inv_mask; typedef struct { @@ -107,6 +114,10 @@ typedef struct { #define ERTS_PAGEALIGNED_SIZE \ (ERTS_INV_PAGEALIGNED_MASK + 1) +struct process; +Eterm erts_mmap_debug_info(struct process*); + +#if HAVE_ERTS_MMAP typedef struct ErtsMemMapper_ ErtsMemMapper; @@ -130,8 +141,6 @@ Eterm erts_mmap_info(ErtsMemMapper*, int *print_to_p, void *print_to_arg, Eterm erts_mmap_info_options(ErtsMemMapper*, char *prefix, int *print_to_p, void *print_to_arg, Uint **hpp, Uint *szp); -struct process; -Eterm erts_mmap_debug_info(ErtsMemMapper*, struct process*); #ifdef ERTS_WANT_MEM_MAPPERS @@ -157,4 +166,6 @@ void hard_dbg_remove_mseg(void* seg, UWord sz); # define HARD_DBG_REMOVE_MSEG(SEG,SZ) #endif +#endif /* HAVE_ERTS_MMAP */ + #endif /* ERL_MMAP_H__ */ |