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

    https://github.com/apache/spark/pull/11805#discussion_r58146476
  
    --- Diff: 
core/src/main/scala/org/apache/spark/storage/memory/MemoryStore.scala ---
    @@ -702,11 +762,12 @@ private[storage] class PartiallySerializedBlock[T](
        */
       def finishWritingToStream(os: OutputStream): Unit = {
         ByteStreams.copy(unrolled.toInputStream(), os)
    --- End diff --
    
    There's actually a bug here: we aren't guaranteed to free the actual 
offHeap memory here. I think that in my benchmarks it just so happened to be 
cleaned by the `sun.misc.Cleaner` that I attached to the DirectByteBuffer in my 
custom allocator. I'm going to take a closer look at this block to try to fix 
the leak issues here.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to