diff --git a/crypto777/OS_nonportable.c b/crypto777/OS_nonportable.c index 56a7a8258..5537d8441 100755 --- a/crypto777/OS_nonportable.c +++ b/crypto777/OS_nonportable.c @@ -600,7 +600,10 @@ void *OS_nonportable_mapfile(char *fname,long *filesizep,int32_t enablewrite) if ( ptr == 0 || ptr == MAP_FAILED ) { if ( enablewrite != 0 ) - printf("map_file.write%d: mapping %s failed? mp %p\n",enablewrite,fname,ptr); + { + printf("map_file.write%d: mapping %s failed? mp %p, usually due to ulimit -n exceeded\n",enablewrite,fname,ptr); + exit(-1); + } return(0); } *filesizep = filesize; diff --git a/crypto777/OS_portable.c b/crypto777/OS_portable.c index ff16d4a65..25d74ac03 100755 --- a/crypto777/OS_portable.c +++ b/crypto777/OS_portable.c @@ -183,7 +183,8 @@ void *OS_portable_mapfile(char *fname,long *filesizep,int32_t enablewrite) close(fd); if ( ptr == 0 || ptr == MAP_FAILED ) { - printf("map_file.write%d: mapping %s failed? mp %p\n",enablewrite,fname,ptr); + printf("map_file.write%d: mapping %s failed? mp %p, usually due to ulimit -n exceeded\n",enablewrite,fname,ptr); + exit(-1); return(0); } *filesizep = filesize;