< prev index next >

src/hotspot/share/gc/g1/g1CardSetMemory.hpp

Print this page

 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 #ifndef SHARE_GC_G1_G1CARDSETMEMORY_HPP
 26 #define SHARE_GC_G1_G1CARDSETMEMORY_HPP
 27 
 28 #include "gc/g1/g1CardSet.hpp"
 29 #include "gc/g1/g1CardSetContainers.hpp"
 30 #include "gc/g1/g1CardSetContainers.inline.hpp"
 31 #include "gc/g1/g1SegmentedArray.hpp"
 32 #include "memory/allocation.hpp"
 33 #include "utilities/growableArray.hpp"
 34 #include "utilities/lockFreeStack.hpp"
 35 
 36 class G1CardSetConfiguration;
 37 class outputStream;
 38 
 39 // Collects G1CardSetAllocator options/heuristics. Called by G1CardSetAllocator
 40 // to determine the next size of the allocated G1CardSetBuffer.
 41 class G1CardSetAllocOptions : public G1SegmentedArrayAllocOptions {
 42   static const uint MinimumBufferSize = 8;
 43   static const uint MaximumBufferSize =  UINT_MAX / 2;
 44 
 45   uint exponential_expand(uint prev_num_elems) const {
 46     return clamp(prev_num_elems * 2, _initial_num_elems, _max_num_elems);
 47   }
 48 
 49 public:
 50   static const uint BufferAlignment = 8;

 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 #ifndef SHARE_GC_G1_G1CARDSETMEMORY_HPP
 26 #define SHARE_GC_G1_G1CARDSETMEMORY_HPP
 27 
 28 #include "gc/g1/g1CardSet.hpp"
 29 #include "gc/g1/g1CardSetContainers.hpp"

 30 #include "gc/g1/g1SegmentedArray.hpp"
 31 #include "memory/allocation.hpp"
 32 #include "utilities/growableArray.hpp"
 33 #include "utilities/lockFreeStack.hpp"
 34 
 35 class G1CardSetConfiguration;
 36 class outputStream;
 37 
 38 // Collects G1CardSetAllocator options/heuristics. Called by G1CardSetAllocator
 39 // to determine the next size of the allocated G1CardSetBuffer.
 40 class G1CardSetAllocOptions : public G1SegmentedArrayAllocOptions {
 41   static const uint MinimumBufferSize = 8;
 42   static const uint MaximumBufferSize =  UINT_MAX / 2;
 43 
 44   uint exponential_expand(uint prev_num_elems) const {
 45     return clamp(prev_num_elems * 2, _initial_num_elems, _max_num_elems);
 46   }
 47 
 48 public:
 49   static const uint BufferAlignment = 8;
< prev index next >