| 888 | } |
| 889 | |
| 890 | const char *mmap_os_err(void) |
| 891 | { |
| 892 | static const char blank[] = ""; |
| 893 | #if defined(__linux__) |
| 894 | if (errno == ENOMEM) { |
| 895 | /* this continues an existing error message: */ |
| 896 | static const char enomem[] = |
| 897 | ", check sys.vm.max_map_count and/or RLIMIT_DATA"; |
| 898 | return enomem; |
| 899 | } |
| 900 | #endif /* OS-specific bits */ |
| 901 | return blank; |
| 902 | } |
| 903 | |
| 904 | void *xmmap(void *start, size_t length, |
| 905 | int prot, int flags, int fd, off_t offset) |
no outgoing calls
no test coverage detected