diff options
author | Jean Boussier <jean.boussier@gmail.com> | 2021-09-14 10:31:34 +0200 |
---|---|---|
committer | Alan Wu <XrXr@users.noreply.github.com> | 2021-10-20 18:19:40 -0400 |
commit | 217f7cb16fe466b8be3cdb969655b4512d5e95fa (patch) | |
tree | ca94eb2272b0aadbe71f41baedf38c0d536e13d8 | |
parent | 96fd8afbf4d93b6831ca119fd8c1f07dfa9abd07 (diff) |
Include errno message in mmap failure output
It might help figure out why it is failing.
-rw-r--r-- | yjit_asm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/yjit_asm.c b/yjit_asm.c index 31e1528ff0..4a296e314c 100644 --- a/yjit_asm.c +++ b/yjit_asm.c @@ -7,6 +7,7 @@ #include <stdarg.h> #include <stdint.h> #include <assert.h> +#include <errno.h> // For mmapp(), sysconf() #ifndef _WIN32 @@ -203,7 +204,7 @@ uint8_t* alloc_exec_mem(uint32_t mem_size) // Check that the memory mapping was successful if (mem_block == MAP_FAILED) { - fprintf(stderr, "mmap call failed\n"); + perror("mmap call failed"); exit(-1); } |