use of io.mycat.memory.unsafe.memory.mm.ResultMergeMemoryManager in project Mycat-Server by MyCATApache.
the class TaskMemoryManagerSuite method leakedPageMemoryIsDetected.
@Test
public void leakedPageMemoryIsDetected() {
final DataNodeMemoryManager manager = new DataNodeMemoryManager(new ResultMergeMemoryManager(new MycatPropertyConf().set("mycat.memory.offHeap.enabled", "false").set("mycat.memory.offHeap.size", "32768"), 1, Long.MAX_VALUE), 0);
// leak memory
manager.allocatePage(4096, null);
Assert.assertEquals(4096, manager.getMemoryConsumptionForThisConnection());
Assert.assertEquals(4096, manager.cleanUpAllAllocatedMemory());
}
Aggregations