Mercurial > hg > graal-compiler
comparison src/share/vm/memory/cardTableModRefBS.cpp @ 10161:746b070f5022
8011661: Insufficient memory message says "malloc" when sometimes it should say "mmap"
Reviewed-by: coleenp, zgu, hseigel
author | ccheung |
---|---|
date | Tue, 30 Apr 2013 11:56:52 -0700 |
parents | 5a9fa2ba85f0 |
children | f9be75d21404 |
comparison
equal
deleted
inserted
replaced
10160:ed5a590835a4 | 10161:746b070f5022 |
---|---|
114 jbyte* guard_card = &_byte_map[_guard_index]; | 114 jbyte* guard_card = &_byte_map[_guard_index]; |
115 uintptr_t guard_page = align_size_down((uintptr_t)guard_card, _page_size); | 115 uintptr_t guard_page = align_size_down((uintptr_t)guard_card, _page_size); |
116 _guard_region = MemRegion((HeapWord*)guard_page, _page_size); | 116 _guard_region = MemRegion((HeapWord*)guard_page, _page_size); |
117 if (!os::commit_memory((char*)guard_page, _page_size, _page_size)) { | 117 if (!os::commit_memory((char*)guard_page, _page_size, _page_size)) { |
118 // Do better than this for Merlin | 118 // Do better than this for Merlin |
119 vm_exit_out_of_memory(_page_size, "card table last card"); | 119 vm_exit_out_of_memory(_page_size, OOM_MMAP_ERROR, "card table last card"); |
120 } | 120 } |
121 | 121 |
122 *guard_card = last_card; | 122 *guard_card = last_card; |
123 | 123 |
124 _lowest_non_clean = | 124 _lowest_non_clean = |
290 | 290 |
291 assert(!new_committed.is_empty(), "Region should not be empty here"); | 291 assert(!new_committed.is_empty(), "Region should not be empty here"); |
292 if (!os::commit_memory((char*)new_committed.start(), | 292 if (!os::commit_memory((char*)new_committed.start(), |
293 new_committed.byte_size(), _page_size)) { | 293 new_committed.byte_size(), _page_size)) { |
294 // Do better than this for Merlin | 294 // Do better than this for Merlin |
295 vm_exit_out_of_memory(new_committed.byte_size(), | 295 vm_exit_out_of_memory(new_committed.byte_size(), OOM_MMAP_ERROR, |
296 "card table expansion"); | 296 "card table expansion"); |
297 } | 297 } |
298 // Use new_end_aligned (as opposed to new_end_for_commit) because | 298 // Use new_end_aligned (as opposed to new_end_for_commit) because |
299 // the cur_committed region may include the guard region. | 299 // the cur_committed region may include the guard region. |
300 } else if (new_end_aligned < cur_committed.end()) { | 300 } else if (new_end_aligned < cur_committed.end()) { |