Skip to content

Commit

Permalink
[ADS-6] Add utility methods to check leaked Allocators/MemoryPools (o…
Browse files Browse the repository at this point in the history
  • Loading branch information
zhztheplayer authored Jan 15, 2021
1 parent 3583ee2 commit 0e5f0ef
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,4 +209,14 @@ object SparkMemoryUtils {
}
getTaskMemoryResources().defaultMemoryPool
}

def getLeakedAllocators(): List[BufferAllocator] = {
val list = new util.ArrayList[BufferAllocator](leakedAllocators)
list.asScala.toList
}

def getLeakedMemoryPools(): List[NativeMemoryPool] = {
val list = new util.ArrayList[NativeMemoryPool](leakedMemoryPools)
list.asScala.toList
}
}

0 comments on commit 0e5f0ef

Please sign in to comment.