[MINOR][TEST] Off -heap memory leaks for unit tests
## What changes were proposed in this pull request? Free off -heap memory . I have checked all the unit tests. ## How was this patch tested? N/A Author: liuxian <liu.xian3@zte.com.cn> Closes #19075 from 10110346/memleak.
This commit is contained in:
parent
e47f48c737
commit
d4895c9de6
|
@ -73,5 +73,6 @@ public class PlatformUtilSuite {
|
|||
Assert.assertEquals(
|
||||
Platform.getByte(offheap.getBaseObject(), offheap.getBaseOffset()),
|
||||
MemoryAllocator.MEMORY_DEBUG_FILL_CLEAN_VALUE);
|
||||
MemoryAllocator.UNSAFE.free(offheap);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,6 +54,7 @@ public class TaskMemoryManagerSuite {
|
|||
final long encodedAddress = manager.encodePageNumberAndOffset(dataPage, offset);
|
||||
Assert.assertEquals(null, manager.getPage(encodedAddress));
|
||||
Assert.assertEquals(offset, manager.getOffsetInPage(encodedAddress));
|
||||
manager.freePage(dataPage, c);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in a new issue