Skip to content
This repository has been archived by the owner on Nov 14, 2022. It is now read-only.

[POAE7-961] fix null pointer issue when offheap enabled. #21

Merged
merged 1 commit into from
Mar 25, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@ public void updateLongArray(LongArray sortedArray, int numRecords, int position)
// update recordPointer in this array
long originalRecordPointer = sortedArray.get(position);
MemoryBlock page = taskMemoryManager.getOriginalPage(originalRecordPointer);
long offset = taskMemoryManager.getOffsetInPage(originalRecordPointer) - page.getBaseOffset();
long baseOffset = page == null? 0: page.getBaseOffset();
long offset = taskMemoryManager.getOffsetInPage(originalRecordPointer) - baseOffset;
MemoryBlock pMemBlock = pageMap.get(page);
long pMemOffset = pMemBlock.getBaseOffset() + offset;
sortedArray.set(position, pMemOffset);
Expand Down