Skip to content

Commit

Permalink
[VL] Following apache#6959, Fix leak memory dump is not correctly pri…
Browse files Browse the repository at this point in the history
…nted (apache#6985)
zhztheplayer authored and shamirchen committed Oct 14, 2024
1 parent 41339cb commit 6dd8318
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -98,16 +98,17 @@ object Runtime {
s"Runtime instance already released: $handle, ${resourceName()}, ${priority()}")
}

def dump(): KnownNameAndStats = {
new KnownNameAndStats() {
override def name: String = resourceName()
override def stats: MemoryUsageStats = collectMemoryUsage()
}
def dump(): String = {
SparkMemoryUtil.prettyPrintStats(
s"[${resourceName()}]",
new KnownNameAndStats() {
override def name: String = resourceName()
override def stats: MemoryUsageStats = collectMemoryUsage()
})
}

if (LOGGER.isDebugEnabled) {
LOGGER.debug(
SparkMemoryUtil.prettyPrintStats("About to release memory manager, usage dump:", dump()))
LOGGER.debug("About to release memory manager, " + dump())
}

RuntimeJniWrapper.releaseRuntime(handle)

0 comments on commit 6dd8318

Please sign in to comment.