< prev index next >

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

Print this page
rev 13014 : imported patch 8180755-remove-bitmap-inline-hpp-include


   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   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/parallel/parMarkBitMap.hpp"
  27 #include "gc/parallel/psCompactionManager.inline.hpp"
  28 #include "gc/parallel/psParallelCompact.inline.hpp"
  29 #include "oops/oop.inline.hpp"
  30 #include "runtime/atomic.hpp"
  31 #include "runtime/os.hpp"
  32 #include "services/memTracker.hpp"
  33 #include "utilities/bitMap.inline.hpp"
  34 
  35 bool
  36 ParMarkBitMap::initialize(MemRegion covered_region)
  37 {
  38   const idx_t bits = bits_required(covered_region);
  39   // The bits will be divided evenly between two bitmaps; each of them should be
  40   // an integral number of words.
  41   assert(bits % (BitsPerWord * 2) == 0, "region size unaligned");
  42 
  43   const size_t words = bits / BitsPerWord;
  44   const size_t raw_bytes = words * sizeof(idx_t);
  45   const size_t page_sz = os::page_size_for_region_aligned(raw_bytes, 10);
  46   const size_t granularity = os::vm_allocation_granularity();




   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   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/parallel/parMarkBitMap.inline.hpp"
  27 #include "gc/parallel/psCompactionManager.inline.hpp"
  28 #include "gc/parallel/psParallelCompact.inline.hpp"
  29 #include "oops/oop.inline.hpp"
  30 #include "runtime/atomic.hpp"
  31 #include "runtime/os.hpp"
  32 #include "services/memTracker.hpp"
  33 #include "utilities/bitMap.inline.hpp"
  34 
  35 bool
  36 ParMarkBitMap::initialize(MemRegion covered_region)
  37 {
  38   const idx_t bits = bits_required(covered_region);
  39   // The bits will be divided evenly between two bitmaps; each of them should be
  40   // an integral number of words.
  41   assert(bits % (BitsPerWord * 2) == 0, "region size unaligned");
  42 
  43   const size_t words = bits / BitsPerWord;
  44   const size_t raw_bytes = words * sizeof(idx_t);
  45   const size_t page_sz = os::page_size_for_region_aligned(raw_bytes, 10);
  46   const size_t granularity = os::vm_allocation_granularity();


< prev index next >