Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19077#discussion_r166280829
  
    --- Diff: 
common/unsafe/src/main/java/org/apache/spark/unsafe/memory/HeapMemoryAllocator.java
 ---
    @@ -98,12 +100,13 @@ public void free(MemoryBlock memory) {
         long[] array = (long[]) memory.obj;
         memory.setObjAndOffset(null, 0);
     
    -    if (shouldPool(size)) {
    +    long alignedSize = 
ByteArrayMethods.roundNumberOfBytesToNearestWord(size);
    --- End diff --
    
    do we need to do it again here? I think the `size` is guaranteed to be 
aligned with word.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to