src/share/vm/gc_implementation/g1/g1RegionToSpaceMapper.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 8068352 Sdiff src/share/vm/gc_implementation/g1

src/share/vm/gc_implementation/g1/g1RegionToSpaceMapper.cpp

Print this page




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  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_implementation/g1/g1BiasedArray.hpp"
  27 #include "gc_implementation/g1/g1RegionToSpaceMapper.hpp"
  28 #include "memory/allocation.inline.hpp"
  29 #include "runtime/virtualspace.hpp"
  30 #include "services/memTracker.hpp"
  31 #include "utilities/bitMap.inline.hpp"
  32 
  33 G1RegionToSpaceMapper::G1RegionToSpaceMapper(ReservedSpace rs,
  34                                              size_t used_size,
  35                                              size_t page_size,
  36                                              size_t region_granularity,
  37                                              MemoryType type) :
  38   _storage(rs, used_size, page_size),
  39   _region_granularity(region_granularity),
  40   _listener(NULL),
  41   _commit_map() {
  42   guarantee(is_power_of_2(page_size), "must be");
  43   guarantee(is_power_of_2(region_granularity), "must be");
  44 
  45   MemTracker::record_virtual_memory_type((address)rs.base(), type);
  46 }
  47 
  48 // G1RegionToSpaceMapper implementation where the region granularity is larger than
  49 // or the same as the commit granularity.




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  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_implementation/g1/g1BiasedArray.hpp"
  27 #include "gc_implementation/g1/g1RegionToSpaceMapper.hpp"
  28 #include "memory/allocation.inline.hpp"
  29 #include "memory/virtualspace.hpp"
  30 #include "services/memTracker.hpp"
  31 #include "utilities/bitMap.inline.hpp"
  32 
  33 G1RegionToSpaceMapper::G1RegionToSpaceMapper(ReservedSpace rs,
  34                                              size_t used_size,
  35                                              size_t page_size,
  36                                              size_t region_granularity,
  37                                              MemoryType type) :
  38   _storage(rs, used_size, page_size),
  39   _region_granularity(region_granularity),
  40   _listener(NULL),
  41   _commit_map() {
  42   guarantee(is_power_of_2(page_size), "must be");
  43   guarantee(is_power_of_2(region_granularity), "must be");
  44 
  45   MemTracker::record_virtual_memory_type((address)rs.base(), type);
  46 }
  47 
  48 // G1RegionToSpaceMapper implementation where the region granularity is larger than
  49 // or the same as the commit granularity.


src/share/vm/gc_implementation/g1/g1RegionToSpaceMapper.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File