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

Commit

Permalink
[POAE7-961] fix null pointer issue when offheap enabled. (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
yma11 authored and zhixingheyi-tian committed Apr 9, 2021
1 parent c4ca0f1 commit 4d3973e
Showing 1 changed file with 2 additions and 1 deletion.
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

0 comments on commit 4d3973e

Please sign in to comment.