1.1 --- a/src/share/vm/memory/cardTableModRefBS.cpp Mon Jun 10 11:30:51 2013 +0200 1.2 +++ b/src/share/vm/memory/cardTableModRefBS.cpp Thu Jun 13 11:16:38 2013 -0700 1.3 @@ -110,11 +110,8 @@ 1.4 jbyte* guard_card = &_byte_map[_guard_index]; 1.5 uintptr_t guard_page = align_size_down((uintptr_t)guard_card, _page_size); 1.6 _guard_region = MemRegion((HeapWord*)guard_page, _page_size); 1.7 - if (!os::commit_memory((char*)guard_page, _page_size, _page_size)) { 1.8 - // Do better than this for Merlin 1.9 - vm_exit_out_of_memory(_page_size, OOM_MMAP_ERROR, "card table last card"); 1.10 - } 1.11 - 1.12 + os::commit_memory_or_exit((char*)guard_page, _page_size, _page_size, 1.13 + !ExecMem, "card table last card"); 1.14 *guard_card = last_card; 1.15 1.16 _lowest_non_clean = 1.17 @@ -312,12 +309,9 @@ 1.18 MemRegion(cur_committed.end(), new_end_for_commit); 1.19 1.20 assert(!new_committed.is_empty(), "Region should not be empty here"); 1.21 - if (!os::commit_memory((char*)new_committed.start(), 1.22 - new_committed.byte_size(), _page_size)) { 1.23 - // Do better than this for Merlin 1.24 - vm_exit_out_of_memory(new_committed.byte_size(), OOM_MMAP_ERROR, 1.25 - "card table expansion"); 1.26 - } 1.27 + os::commit_memory_or_exit((char*)new_committed.start(), 1.28 + new_committed.byte_size(), _page_size, 1.29 + !ExecMem, "card table expansion"); 1.30 // Use new_end_aligned (as opposed to new_end_for_commit) because 1.31 // the cur_committed region may include the guard region. 1.32 } else if (new_end_aligned < cur_committed.end()) {