hotspot/src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.cpp
changeset 18069 e6d4971c8650
parent 17087 f0b76c4c93a0
child 22551 9bf46d16dcc6
equal deleted inserted replaced
18025:b7bcf7497f93 18069:e6d4971c8650
     1 /*
     1 /*
     2  * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   563     HeapWord* new_end_for_commit =
   563     HeapWord* new_end_for_commit =
   564       MIN2(cur_committed.end(), _guard_region.start());
   564       MIN2(cur_committed.end(), _guard_region.start());
   565     if(new_start_aligned < new_end_for_commit) {
   565     if(new_start_aligned < new_end_for_commit) {
   566       MemRegion new_committed =
   566       MemRegion new_committed =
   567         MemRegion(new_start_aligned, new_end_for_commit);
   567         MemRegion(new_start_aligned, new_end_for_commit);
   568       if (!os::commit_memory((char*)new_committed.start(),
   568       os::commit_memory_or_exit((char*)new_committed.start(),
   569                              new_committed.byte_size())) {
   569                                 new_committed.byte_size(), !ExecMem,
   570         vm_exit_out_of_memory(new_committed.byte_size(), OOM_MMAP_ERROR,
   570                                 "card table expansion");
   571                               "card table expansion");
       
   572       }
       
   573     }
   571     }
   574     result = true;
   572     result = true;
   575   } else if (new_start_aligned > cur_committed.start()) {
   573   } else if (new_start_aligned > cur_committed.start()) {
   576     // Shrink the committed region
   574     // Shrink the committed region
   577 #if 0 // uncommitting space is currently unsafe because of the interactions
   575 #if 0 // uncommitting space is currently unsafe because of the interactions