001/* 002 * This file is part of the Jikes RVM project (http://jikesrvm.org). 003 * 004 * This file is licensed to You under the Eclipse Public License (EPL); 005 * You may not use this file except in compliance with the License. You 006 * may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/eclipse-1.0.php 009 * 010 * See the COPYRIGHT.txt file distributed with this work for information 011 * regarding copyright ownership. 012 */ 013package org.jikesrvm.mm.mminterface; 014 015import static org.jikesrvm.runtime.UnboxedSizeConstants.LOG_BYTES_IN_WORD; 016 017 018/** 019 * This class merely exposes the MMTk constants into the Jikes RVM 020 * package space so that they can be accessed by the VM in an 021 * MM-neutral way. It is separate from MemoryManager to break 022 * cyclic class-loading dependencies. 023 */ 024public class MemoryManagerConstants { 025 /** {@code true} if the selected plan needs support for linearly scanning the heap */ 026 public static final boolean NEEDS_LINEAR_SCAN = Selected.Constraints.get().needsLinearScan(); 027 /** Number of bits in the GC header required by the selected plan */ 028 public static final int GC_HEADER_BITS = Selected.Constraints.get().gcHeaderBits(); 029 /** Number of additional bytes required in the header by the selected plan */ 030 public static final int GC_HEADER_BYTES = Selected.Constraints.get().gcHeaderWords() << LOG_BYTES_IN_WORD; 031 /** {@code true} if the selected plan requires concurrent worker threads */ 032 public static final boolean NEEDS_CONCURRENT_WORKERS = Selected.Constraints.get().needsConcurrentWorkers(); 033 /** {@code true} if the selected plan needs support for generating a GC trace */ 034 public static final boolean GENERATE_GC_TRACE = Selected.Constraints.get().generateGCTrace(); 035 /** {@code true} if the selected plan may move objects */ 036 public static final boolean MOVES_OBJECTS = Selected.Constraints.get().movesObjects(); 037 /** {@code true} if the selected plan moves TIB objects */ 038 public static final boolean MOVES_TIBS = false; 039 /** {@code true} if the selected plan moves code */ 040 public static final boolean MOVES_CODE = false; 041} 042