[ 
https://issues.apache.org/jira/browse/SPARK-15045?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Davies Liu updated SPARK-15045:
-------------------------------
    Assignee: Jacek Lewandowski

> Remove dead code in TaskMemoryManager.cleanUpAllAllocatedMemory for pageTable
> -----------------------------------------------------------------------------
>
>                 Key: SPARK-15045
>                 URL: https://issues.apache.org/jira/browse/SPARK-15045
>             Project: Spark
>          Issue Type: Improvement
>          Components: Spark Core
>    Affects Versions: 2.0.0
>            Reporter: Jacek Laskowski
>            Assignee: Jacek Lewandowski
>             Fix For: 2.0.0
>
>
> Unless my eyes trick me, {{TaskMemoryManager}} first clears up {{pageTable}}  
> in a synchronized block and right after the block it does it again. I think 
> the outside cleaning is a dead code.
> See 
> https://github.com/apache/spark/blob/master/core/src/main/java/org/apache/spark/memory/TaskMemoryManager.java#L382-L397
>  with the relevant snippet pasted below:
> {code}
>   public long cleanUpAllAllocatedMemory() {
>     synchronized (this) {
>       Arrays.fill(pageTable, null);
>       ...
>     }
>     for (MemoryBlock page : pageTable) {
>       if (page != null) {
>         memoryManager.tungstenMemoryAllocator().free(page);
>       }
>     }
>     Arrays.fill(pageTable, null);
>    ...
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to