Github user kiszk commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19077#discussion_r166368258
  
    --- Diff: 
common/unsafe/src/test/java/org/apache/spark/unsafe/PlatformUtilSuite.java ---
    @@ -134,4 +135,24 @@ public void memoryDebugFillEnabledInTest() {
           MemoryAllocator.MEMORY_DEBUG_FILL_CLEAN_VALUE);
         MemoryAllocator.UNSAFE.free(offheap);
       }
    +
    +  @Test
    +  public void heapMemoryReuse() {
    +    MemoryAllocator heapMem = new HeapMemoryAllocator();
    +    // The size is less than 1M,allocate new memory every time.
    --- End diff --
    
    Is it better to refer to `HeapMemoryAllocator.POOLING_THRESHOLD_BYTES` at 
`1M`?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to