< prev index next >

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

Print this page
rev 9847 : 8146395: Add inline qualifier in oop.hpp and fix inlining in gc files
Summary: Fix remaining issues after 8146401


   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/psParallelCompact.hpp"
  28 #include "oops/oop.inline.hpp"
  29 #include "runtime/atomic.inline.hpp"
  30 #include "runtime/os.hpp"
  31 #include "services/memTracker.hpp"
  32 #include "utilities/bitMap.inline.hpp"
  33 
  34 bool
  35 ParMarkBitMap::initialize(MemRegion covered_region)
  36 {
  37   const idx_t bits = bits_required(covered_region);
  38   // The bits will be divided evenly between two bitmaps; each of them should be
  39   // an integral number of words.
  40   assert(bits % (BitsPerWord * 2) == 0, "region size unaligned");
  41 
  42   const size_t words = bits / BitsPerWord;
  43   const size_t raw_bytes = words * sizeof(idx_t);
  44   const size_t page_sz = os::page_size_for_region_aligned(raw_bytes, 10);
  45   const size_t granularity = os::vm_allocation_granularity();
  46   _reserved_byte_size = align_size_up(raw_bytes, MAX2(page_sz, granularity));
  47 




   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/psParallelCompact.inline.hpp"
  28 #include "oops/oop.inline.hpp"
  29 #include "runtime/atomic.inline.hpp"
  30 #include "runtime/os.hpp"
  31 #include "services/memTracker.hpp"
  32 #include "utilities/bitMap.inline.hpp"
  33 
  34 bool
  35 ParMarkBitMap::initialize(MemRegion covered_region)
  36 {
  37   const idx_t bits = bits_required(covered_region);
  38   // The bits will be divided evenly between two bitmaps; each of them should be
  39   // an integral number of words.
  40   assert(bits % (BitsPerWord * 2) == 0, "region size unaligned");
  41 
  42   const size_t words = bits / BitsPerWord;
  43   const size_t raw_bytes = words * sizeof(idx_t);
  44   const size_t page_sz = os::page_size_for_region_aligned(raw_bytes, 10);
  45   const size_t granularity = os::vm_allocation_granularity();
  46   _reserved_byte_size = align_size_up(raw_bytes, MAX2(page_sz, granularity));
  47 


< prev index next >