< prev index next >

src/share/vm/gc/parallel/objectStartArray.cpp

Print this page
rev 12906 : [mq]: gc_interface


  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "gc/parallel/objectStartArray.inline.hpp"
  27 #include "gc/shared/cardTableModRefBS.hpp"
  28 #include "memory/allocation.inline.hpp"
  29 #include "oops/oop.inline.hpp"
  30 #include "runtime/java.hpp"
  31 #include "services/memTracker.hpp"
  32 
  33 void ObjectStartArray::initialize(MemRegion reserved_region) {
  34   // We're based on the assumption that we use the same
  35   // size blocks as the card table.
  36   assert((int)block_size == (int)CardTableModRefBS::card_size, "Sanity");
  37   assert((int)block_size <= 512, "block_size must be less than or equal to 512");
  38 
  39   // Calculate how much space must be reserved
  40   _reserved_region = reserved_region;
  41 
  42   size_t bytes_to_reserve = reserved_region.word_size() / block_size_in_words;
  43   assert(bytes_to_reserve > 0, "Sanity");
  44 
  45   bytes_to_reserve =
  46     align_size_up(bytes_to_reserve, os::vm_allocation_granularity());
  47 
  48   // Do not use large-pages for the backing store. The one large page region
  49   // will be used for the heap proper.
  50   ReservedSpace backing_store(bytes_to_reserve);
  51   if (!backing_store.is_reserved()) {
  52     vm_exit_during_initialization("Could not reserve space for ObjectStartArray");
  53   }
  54   MemTracker::record_virtual_memory_type((address)backing_store.base(), mtGC);
  55 
  56   // We do not commit any memory initially




  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "gc/parallel/objectStartArray.inline.hpp"
  27 #include "gc/shared/cardTableModRefBS.hpp"
  28 #include "memory/allocation.inline.hpp"
  29 #include "oops/oop.inline.hpp"
  30 #include "runtime/java.hpp"
  31 #include "services/memTracker.hpp"
  32 
  33 void ObjectStartArray::initialize(MemRegion reserved_region) {
  34   // We're based on the assumption that we use the same
  35   // size blocks as the card table.
  36   assert((int)block_size == (int)CardTable::card_size, "Sanity");
  37   assert((int)block_size <= 512, "block_size must be less than or equal to 512");
  38 
  39   // Calculate how much space must be reserved
  40   _reserved_region = reserved_region;
  41 
  42   size_t bytes_to_reserve = reserved_region.word_size() / block_size_in_words;
  43   assert(bytes_to_reserve > 0, "Sanity");
  44 
  45   bytes_to_reserve =
  46     align_size_up(bytes_to_reserve, os::vm_allocation_granularity());
  47 
  48   // Do not use large-pages for the backing store. The one large page region
  49   // will be used for the heap proper.
  50   ReservedSpace backing_store(bytes_to_reserve);
  51   if (!backing_store.is_reserved()) {
  52     vm_exit_during_initialization("Could not reserve space for ObjectStartArray");
  53   }
  54   MemTracker::record_virtual_memory_type((address)backing_store.base(), mtGC);
  55 
  56   // We do not commit any memory initially


< prev index next >