aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'pocs/paxmark-libs/libmypax.c')
-rw-r--r--pocs/paxmark-libs/libmypax.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/pocs/paxmark-libs/libmypax.c b/pocs/paxmark-libs/libmypax.c
new file mode 100644
index 0000000..a53b62e
--- /dev/null
+++ b/pocs/paxmark-libs/libmypax.c
@@ -0,0 +1,11 @@
+#include <stdio.h>
+#include <sys/mman.h>
+#include <errno.h>
+#include <string.h>
+
+void
+doit() {
+ size_t m = (size_t) mmap( NULL, 4096, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0 );
+ if( m == (size_t) MAP_FAILED )
+ printf("%s\n", strerror(errno));
+}