spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Apache Spark (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (SPARK-15045) Remove dead code in TaskMemoryManager.cleanUpAllAllocatedMemory for pageTable
Date Mon, 02 May 2016 02:58:13 GMT

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

Apache Spark reassigned SPARK-15045:
------------------------------------

    Assignee: Apache Spark

> 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: Apache Spark
>            Priority: Trivial
>
> 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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org


Mime
View raw message