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

    https://github.com/apache/spark/pull/9127#discussion_r42906605
  
    --- Diff: core/src/main/java/org/apache/spark/memory/TaskMemoryManager.java 
---
    @@ -277,10 +311,20 @@ public long cleanUpAllAllocatedMemory() {
             freedBytes += memory.size();
             // We don't call free() here because that calls Set.remove, which 
would lead to a
             // ConcurrentModificationException here.
    -        executorMemoryManager.free(memory);
    +        memoryManager.tungstenMemoryAllocator().free(memory);
    --- End diff --
    
    "Everywhere" is only five places, all in TaskMemoryManager. To address your 
comment, I think I'd have to add two methods, `allocateTungstenMemory()` and 
`freeTungstenMemory()`, which only forwarded to that field. Given that, I'm not 
sure that I want to fix this; it's a net increase in code and I don't feel that 
it necessarily buys us any increase in clarity or correctness.


---
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