Give a better diagnostic for the commo x86-64 "mprotect: Unable
to allocate memory" error, as suggested by Max Mikhanosha on sbcl-devel.
#include "genesis/fdefn.h"
#include <sys/socket.h>
#include <sys/utsname.h>
+#include <errno.h>
#include <sys/types.h>
#include <signal.h>
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");
+ }
}
}
\f
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.9.13.17"
+"0.9.13.18"