remove whitespace. Add extra message fro linux ENOMEM on uncommit

This commit is contained in:
Robert Toyonaga 2026-01-23 09:59:34 -05:00
parent 23bd4decab
commit 2c7116ea71
2 changed files with 3 additions and 1 deletions

View File

@ -3453,6 +3453,9 @@ bool os::pd_uncommit_memory(char* addr, size_t size, bool exec) {
log_trace(os, map)("mmap failed: " RANGEFMT " errno=(%s)",
RANGEFMTARGS(addr, size),
os::strerror(ep.saved_errno()));
if (ep.saved_errno() == ENOMEM) {
fatal("Failed to uncommit " RANGEFMT " It is possible that the process's maximum number of mappings would have been exceeded. Try increasing the limit.", RANGEFMTARGS(addr, size));
}
return false;
}
return true;

View File

@ -192,7 +192,6 @@ void VirtualSpaceNode::uncommit_range(MetaWord* p, size_t word_size) {
// Uncommit...
os::uncommit_memory((char*)p, word_size * BytesPerWord, false);
ASAN_POISON_MEMORY_REGION((char*)p, word_size * BytesPerWord);
UL2(debug, "... uncommitted %zu words.", committed_words_in_range);