X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fruntime%2Flinux-os.c;h=026923ae15d81c4d2d21b8a32a99dbfd995d62fa;hb=03363f0145ab5e88a17a4b881068dc921f7d122f;hp=345ff482ba3941479cd798b4b909ba602f07eb48;hpb=844e8597d7ca9fda207ab2358ee027db86f6c120;p=sbcl.git diff --git a/src/runtime/linux-os.c b/src/runtime/linux-os.c index 345ff48..026923a 100644 --- a/src/runtime/linux-os.c +++ b/src/runtime/linux-os.c @@ -36,6 +36,7 @@ #include "genesis/fdefn.h" #include #include +#include #include #include @@ -284,7 +285,14 @@ void os_protect(os_vm_address_t address, os_vm_size_t length, os_vm_prot_t prot) { if (mprotect(address, length, prot) == -1) { - perror("mprotect"); + if (errno == ENOMEM) { + lose("An mprotect call failed with ENOMEM. This probably means that the maximum amount\n" + "of separate memory mappings was exceeded. To fix the problem, either increase\n" + "the maximum with e.g. 'echo 262144 > /proc/sys/vm/max_map_count' or recompile\n" + "SBCL with a larger value for GENCGC-PAGE-SIZE in 'src/target/parms.lisp'."); + } else { + perror("mprotect"); + } } }