hotspot/src/share/vm/gc/g1/g1PageBasedVirtualSpace.hpp
author stefank
Wed, 05 Jul 2017 11:33:17 +0200
changeset 46625 edefffab74e2
parent 46619 a3919f5e8d2b
permissions -rw-r--r--
8183552: Move align functions to align.hpp Reviewed-by: stuefe, pliden
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
26160
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
     1
/*
30291
54cdc5c1a9cb 8068352: Move virtualspace.* out of src/share/vm/runtime to memory directory
coleenp
parents: 30158
diff changeset
     2
 * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
26160
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
     4
 *
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
     7
 * published by the Free Software Foundation.
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
     8
 *
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    13
 * accompanied this code).
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    14
 *
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    18
 *
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    21
 * questions.
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    22
 *
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    23
 */
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    24
30764
fec48bf5a827 8079792: GC directory structure cleanup
pliden
parents: 30291
diff changeset
    25
#ifndef SHARE_VM_GC_G1_G1PAGEBASEDVIRTUALSPACE_HPP
fec48bf5a827 8079792: GC directory structure cleanup
pliden
parents: 30291
diff changeset
    26
#define SHARE_VM_GC_G1_G1PAGEBASEDVIRTUALSPACE_HPP
26160
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    27
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    28
#include "memory/allocation.hpp"
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    29
#include "memory/memRegion.hpp"
30291
54cdc5c1a9cb 8068352: Move virtualspace.* out of src/share/vm/runtime to memory directory
coleenp
parents: 30158
diff changeset
    30
#include "memory/virtualspace.hpp"
46625
edefffab74e2 8183552: Move align functions to align.hpp
stefank
parents: 46619
diff changeset
    31
#include "utilities/align.hpp"
26160
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    32
#include "utilities/bitMap.hpp"
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    33
41178
e567be097315 8157952: Parallelize Memory Pretouch
tschatzl
parents: 38177
diff changeset
    34
class WorkGang;
e567be097315 8157952: Parallelize Memory Pretouch
tschatzl
parents: 38177
diff changeset
    35
26160
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    36
// Virtual space management helper for a virtual space with an OS page allocation
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    37
// granularity.
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    38
// (De-)Allocation requests are always OS page aligned by passing a page index
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    39
// and multiples of pages.
30158
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
    40
// For systems that only commits of memory in a given size (always greater than
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
    41
// page size) the base address is required to be aligned to that page size.
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
    42
// The actual size requested need not be aligned to that page size, but the size
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
    43
// of the reservation passed may be rounded up to this page size. Any fragment
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
    44
// (less than the page size) of the actual size at the tail of the request will
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
    45
// be committed using OS small pages.
26160
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    46
// The implementation gives an error when trying to commit or uncommit pages that
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    47
// have already been committed or uncommitted.
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    48
class G1PageBasedVirtualSpace VALUE_OBJ_CLASS_SPEC {
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    49
  friend class VMStructs;
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    50
 private:
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    51
  // Reserved area addresses.
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    52
  char* _low_boundary;
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    53
  char* _high_boundary;
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    54
30158
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
    55
  // The size of the tail in bytes of the handled space that needs to be committed
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
    56
  // using small pages.
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
    57
  size_t _tail_size;
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
    58
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
    59
  // The preferred page size used for commit/uncommit in bytes.
26160
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    60
  size_t _page_size;
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    61
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    62
  // Bitmap used for verification of commit/uncommit operations.
38177
b0c9cb06506b 8141501: Problems with BitMap buffer management
stefank
parents: 30764
diff changeset
    63
  CHeapBitMap _committed;
26160
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    64
28482
e1a8d03c342f 8062063: Usage of UseHugeTLBFS, UseLargePagesInMetaspace and huge SurvivorAlignmentInBytes cause crashes in CMBitMapClosure::do_bit
sjohanss
parents: 26160
diff changeset
    65
  // Bitmap used to keep track of which pages are dirty or not for _special
e1a8d03c342f 8062063: Usage of UseHugeTLBFS, UseLargePagesInMetaspace and huge SurvivorAlignmentInBytes cause crashes in CMBitMapClosure::do_bit
sjohanss
parents: 26160
diff changeset
    66
  // spaces. This is needed because for those spaces the underlying memory
e1a8d03c342f 8062063: Usage of UseHugeTLBFS, UseLargePagesInMetaspace and huge SurvivorAlignmentInBytes cause crashes in CMBitMapClosure::do_bit
sjohanss
parents: 26160
diff changeset
    67
  // will only be zero filled the first time it is committed. Calls to commit
e1a8d03c342f 8062063: Usage of UseHugeTLBFS, UseLargePagesInMetaspace and huge SurvivorAlignmentInBytes cause crashes in CMBitMapClosure::do_bit
sjohanss
parents: 26160
diff changeset
    68
  // will use this bitmap and return whether or not the memory is zero filled.
38177
b0c9cb06506b 8141501: Problems with BitMap buffer management
stefank
parents: 30764
diff changeset
    69
  CHeapBitMap _dirty;
28482
e1a8d03c342f 8062063: Usage of UseHugeTLBFS, UseLargePagesInMetaspace and huge SurvivorAlignmentInBytes cause crashes in CMBitMapClosure::do_bit
sjohanss
parents: 26160
diff changeset
    70
26160
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    71
  // Indicates that the entire space has been committed and pinned in memory,
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    72
  // os::commit_memory() or os::uncommit_memory() have no function.
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    73
  bool _special;
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    74
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    75
  // Indicates whether the committed space should be executable.
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    76
  bool _executable;
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    77
30158
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
    78
  // Helper function for committing memory. Commit the given memory range by using
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
    79
  // _page_size pages as much as possible and the remainder with small sized pages.
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
    80
  void commit_internal(size_t start_page, size_t end_page);
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
    81
  // Commit num_pages pages of _page_size size starting from start. All argument
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
    82
  // checking has been performed.
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
    83
  void commit_preferred_pages(size_t start_page, size_t end_page);
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
    84
  // Commit space at the high end of the space that needs to be committed with small
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
    85
  // sized pages.
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
    86
  void commit_tail();
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
    87
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
    88
  // Uncommit the given memory range.
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
    89
  void uncommit_internal(size_t start_page, size_t end_page);
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
    90
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
    91
  // Pretouch the given memory range.
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
    92
  void pretouch_internal(size_t start_page, size_t end_page);
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
    93
26160
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    94
  // Returns the index of the page which contains the given address.
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    95
  uintptr_t  addr_to_page_index(char* addr) const;
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
    96
  // Returns the address of the given page index.
30158
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
    97
  char*  page_start(size_t index) const;
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
    98
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
    99
  // Is the given page index the last page?
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
   100
  bool is_last_page(size_t index) const { return index == (_committed.size() - 1); }
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
   101
  // Is the given page index the first after last page?
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
   102
  bool is_after_last_page(size_t index) const;
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
   103
  // Is the last page only partially covered by this space?
46619
a3919f5e8d2b 8178499: Remove _ptr_ and _size_ infixes from align functions
stefank
parents: 41178
diff changeset
   104
  bool is_last_page_partial() const { return !is_aligned(_high_boundary, _page_size); }
30158
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
   105
  // Returns the end address of the given page bounded by the reserved space.
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
   106
  char* bounded_end_addr(size_t end_page) const;
26160
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
   107
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
   108
  // Returns true if the entire area is backed by committed memory.
30158
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
   109
  bool is_area_committed(size_t start_page, size_t size_in_pages) const;
26160
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
   110
  // Returns true if the entire area is not backed by committed memory.
30158
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
   111
  bool is_area_uncommitted(size_t start_page, size_t size_in_pages) const;
26160
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
   112
30158
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
   113
  void initialize_with_page_size(ReservedSpace rs, size_t used_size, size_t page_size);
26160
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
   114
 public:
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
   115
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
   116
  // Commit the given area of pages starting at start being size_in_pages large.
28482
e1a8d03c342f 8062063: Usage of UseHugeTLBFS, UseLargePagesInMetaspace and huge SurvivorAlignmentInBytes cause crashes in CMBitMapClosure::do_bit
sjohanss
parents: 26160
diff changeset
   117
  // Returns true if the given area is zero filled upon completion.
30158
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
   118
  bool commit(size_t start_page, size_t size_in_pages);
26160
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
   119
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
   120
  // Uncommit the given area of pages starting at start being size_in_pages large.
30158
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
   121
  void uncommit(size_t start_page, size_t size_in_pages);
26160
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
   122
41178
e567be097315 8157952: Parallelize Memory Pretouch
tschatzl
parents: 38177
diff changeset
   123
  void pretouch(size_t start_page, size_t size_in_pages, WorkGang* pretouch_gang = NULL);
e567be097315 8157952: Parallelize Memory Pretouch
tschatzl
parents: 38177
diff changeset
   124
30158
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
   125
  // Initialize the given reserved space with the given base address and the size
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
   126
  // actually used.
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
   127
  // Prefer to commit in page_size chunks.
bd6094906ef8 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
tschatzl
parents: 28482
diff changeset
   128
  G1PageBasedVirtualSpace(ReservedSpace rs, size_t used_size, size_t page_size);
26160
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
   129
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
   130
  // Destruction
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
   131
  ~G1PageBasedVirtualSpace();
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
   132
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
   133
  // Amount of reserved memory.
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
   134
  size_t reserved_size() const;
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
   135
  // Memory used in this virtual space.
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
   136
  size_t committed_size() const;
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
   137
  // Memory left to use/expand in this virtual space.
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
   138
  size_t uncommitted_size() const;
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
   139
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
   140
  bool contains(const void* p) const;
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
   141
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
   142
  MemRegion reserved() {
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
   143
    MemRegion x((HeapWord*)_low_boundary, reserved_size() / HeapWordSize);
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
   144
    return x;
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
   145
  }
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
   146
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
   147
  void check_for_contiguity() PRODUCT_RETURN;
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
   148
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
   149
  // Debugging
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
   150
  void print_on(outputStream* out) PRODUCT_RETURN;
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
   151
  void print();
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
   152
};
aba6b01cb988 8038423: G1: Decommit memory within heap
tschatzl
parents:
diff changeset
   153
30764
fec48bf5a827 8079792: GC directory structure cleanup
pliden
parents: 30291
diff changeset
   154
#endif // SHARE_VM_GC_G1_G1PAGEBASEDVIRTUALSPACE_HPP