use of org.mmtk.harness.scheduler.MMTkThread in project JikesRVM by JikesRVM.
the class FreeListTests method testSetSentinel.
@Test
public void testSetSentinel() throws Throwable {
Thread t = new MMTkThread() {
public void run() {
GenericFreeList fl = createFreeList(1024, 2, 32);
fl.setSentinel(1);
}
};
runMMTkThread(t);
}
use of org.mmtk.harness.scheduler.MMTkThread in project JikesRVM by JikesRVM.
the class FreeListTests method testAlloc6.
/**
* Test coalescing across different unit sizes
*/
@Test
public void testAlloc6() throws Throwable {
Thread t = new MMTkThread() {
public void run() {
GenericFreeList fl = createFreeList(4, 2, 32);
assertEquals(0, fl.alloc(1));
assertEquals(2, fl.alloc(2));
assertEquals(1, fl.alloc(1));
assertEquals(-1, fl.alloc(1));
fl.free(0);
fl.free(2);
assertEquals(-1, fl.alloc(4));
fl.free(1);
assertEquals(0, fl.alloc(4));
}
};
runMMTkThread(t);
}
use of org.mmtk.harness.scheduler.MMTkThread in project JikesRVM by JikesRVM.
the class FreeListTests method testAlloc5.
/**
* Allocate different sizes, ensuring that allocations are correctly aligned
*/
@Test
public void testAlloc5() throws Throwable {
Thread t = new MMTkThread() {
public void run() {
GenericFreeList fl = createFreeList(4, 2, 1);
assertEquals(0, fl.alloc(1));
assertEquals(2, fl.alloc(2));
assertEquals(1, fl.alloc(1));
assertEquals(-1, fl.alloc(1));
}
};
runMMTkThread(t);
}
use of org.mmtk.harness.scheduler.MMTkThread in project JikesRVM by JikesRVM.
the class RawMemoryFreeListTest method testRawMemoryFreeListAddrAddrIntInt.
@Test
public void testRawMemoryFreeListAddrAddrIntInt() throws Throwable {
Thread t = new MMTkThread() {
@Override
public void run() {
new RawMemoryFreeList(baseAddress, mapLimit(1024, 1), 1024, 1);
}
};
runMMTkThread(t);
}
use of org.mmtk.harness.scheduler.MMTkThread in project JikesRVM by JikesRVM.
the class RawMemoryFreeListTest method testGenericFreeListIntIntIntLarge.
@Test
public void testGenericFreeListIntIntIntLarge() throws Throwable {
Thread t = new MMTkThread() {
@Override
public void run() {
new RawMemoryFreeList(baseAddress, mapLimit(ONE_MEG, 32), ONE_MEG, 2, 32);
}
};
runMMTkThread(t);
}
Aggregations