Skip to content
Snippets Groups Projects
Commit d4895c9d authored by liuxian's avatar liuxian Committed by Sean Owen
Browse files

[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.
parent e47f48c7
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment