[ https://issues.apache.org/jira/browse/SPARK-15045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15266078#comment-15266078 ]
Apache Spark commented on SPARK-15045: -------------------------------------- User 'abhi951990' has created a pull request for this issue: https://github.com/apache/spark/pull/12829 > 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 > 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-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org