spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JoshRosen <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-10984] [WIP] Simplify *MemoryManager cl...
Date Fri, 23 Oct 2015 19:45:42 GMT
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


Mime
View raw message