Skip to content

Commit

Permalink
fix test suite build failure
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangxb1987 committed Aug 21, 2018
1 parent 8bde467 commit 3ec52f8
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

import java.io.IOException;

import org.apache.spark.unsafe.memory.MemoryBlock;

public class TestMemoryConsumer extends MemoryConsumer {
public TestMemoryConsumer(TaskMemoryManager memoryManager, MemoryMode mode) {
super(memoryManager, 1024L, mode);
Expand All @@ -43,6 +45,11 @@ void free(long size) {
used -= size;
taskMemoryManager.releaseExecutionMemory(size, this);
}

public void freePage(MemoryBlock page) {
used -= page.size();
taskMemoryManager.freePage(page, this);
}
}


0 comments on commit 3ec52f8

Please sign in to comment.