Brings this platform in line with other POSIX backends. It is desirable
that we do not `lose' just because too many threads have been created,
for reasons of user-friendliness -- and also because individual
ill-behaved tests should not cause the entire run-tests process to fail.
if (addr == MAP_FAILED) {
perror("mmap");
if (addr == MAP_FAILED) {
perror("mmap");
- lose ("Error in mmap(..)\n");
+ /* While it is generally hard to recover from out-of-memory
+ * situations, we require callers to decide on the right course
+ * of action here. Consider thread creation: Failure to mmap
+ * here is common if users have started too many threads, and
+ * often we can recover from that and treat it as an ordinary
+ * error. */
+ return 0;