Jacek Laskowski created SPARK-15045:
---------------------------------------
Summary: 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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org
|