mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Include errno message in mmap failure output
It might help figure out why it is failing.
This commit is contained in:
parent
96fd8afbf4
commit
217f7cb16f
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue