コード例 #1
0
 @BeforeClass
 public static void setUpBeforeClass() throws Exception {
   VMSettings.set(VMSettings.HEAP_SIZE, SEMI_SIZE * 2);
   VMSettings.set(VMSettings.GC_TYPE, VMConstants.GC_COPYING);
   VMMemoryManager.resetMemoryManager();
   VMMemoryManager.initializeMemoryManager();
 }
コード例 #2
0
 @Before
 public void setUp() throws Exception {
   env = new VMEnvironment();
   VMInterpreter i = VMInterpreter.getInstance();
   i.resetPartVM();
   // Set the environment
   final Method m = i.getClass().getDeclaredMethod(SET_ENV_METHOD, VMEnvironment.class);
   m.setAccessible(true);
   m.invoke(i, env);
   VMMemoryManager.resetMemoryManager();
   VMMemoryManager.initializeMemoryManager();
   final Field f = VMMemoryManager.class.getDeclaredField(MEM_MANAGER_NAME);
   f.setAccessible(true);
   manager = (VMMemoryManager) f.get(null);
 }