You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by manishgupta88 <gi...@git.apache.org> on 2018/10/03 14:02:51 UTC
[GitHub] carbondata pull request #2793: [CARBONDATA-2990] Fixed JVM crash when rebuil...
Github user manishgupta88 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2793#discussion_r222318367
--- Diff: core/src/main/java/org/apache/carbondata/core/memory/UnsafeMemoryManager.java ---
@@ -217,6 +212,17 @@ public static MemoryBlock allocateMemoryWithRetry(MemoryAllocator memoryAllocato
return baseBlock;
}
+ private MemoryAllocator getMemoryAllocator(MemoryType memoryType) {
+ switch (memoryType) {
+ case ONHEAP:
+ return MemoryAllocator.HEAP;
+ case OFFHEAP:
+ return MemoryAllocator.UNSAFE;
+ default:
+ return MemoryAllocator.UNSAFE;
--- End diff --
combine OFFHEAP and default case as one
`case OFFHEAP:
default:
return MemoryAllocator.UNSAFE;`
---