aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/sys/common/erl_mmap.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2016-05-04 17:44:07 +0200
committerSverker Eriksson <[email protected]>2016-05-04 18:55:46 +0200
commitdd5087bf582bba0879fa352bdc0ddcbf06d943d2 (patch)
treee9c0958a8541095a07e3a85b715d04f00b0a5efc /erts/emulator/sys/common/erl_mmap.c
parent067c234829144dd1c33b9640cd6a0e5faf3d04b3 (diff)
downloadotp-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.c')
-rw-r--r--erts/emulator/sys/common/erl_mmap.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/erts/emulator/sys/common/erl_mmap.c b/erts/emulator/sys/common/erl_mmap.c
index bf675cf1ab..53009a1481 100644
--- a/erts/emulator/sys/common/erl_mmap.c
+++ b/erts/emulator/sys/common/erl_mmap.c
@@ -28,6 +28,8 @@
#include "erl_mmap.h"
#include <stddef.h>
+#if HAVE_ERTS_MMAP
+
/* #define ERTS_MMAP_OP_RINGBUF_SZ 100 */
#if defined(DEBUG) || 0
@@ -2513,9 +2515,13 @@ Eterm erts_mmap_info_options(ErtsMemMapper* mm,
return res;
}
+#endif /* HAVE_ERTS_MMAP */
-Eterm erts_mmap_debug_info(ErtsMemMapper* mm, Process* p)
+Eterm erts_mmap_debug_info(Process* p)
{
+#if HAVE_ERTS_MMAP
+ ErtsMemMapper* mm = &erts_dflt_mmapper;
+
if (mm->supercarrier) {
ERTS_DECL_AM(sabot);
ERTS_DECL_AM(satop);
@@ -2553,9 +2559,8 @@ Eterm erts_mmap_debug_info(ErtsMemMapper* mm, Process* p)
HRelease(p, hp_end, hp);
return list;
}
- else {
- return am_undefined;
- }
+#endif
+ return am_undefined;
}