Skip to content

Commit 4043a06

Browse files
committed
SPARK-54449: Check if off heap config is enabled before getting off heap size value
1 parent 4e1e995 commit 4043a06

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/scala/org/apache/spark/memory/MemoryManager.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ private[spark] abstract class MemoryManager(
5858
onHeapStorageMemoryPool.incrementPoolSize(onHeapStorageMemory)
5959
onHeapExecutionMemoryPool.incrementPoolSize(onHeapExecutionMemory)
6060

61-
protected[this] val maxOffHeapMemory = conf.get(MEMORY_OFFHEAP_SIZE)
61+
protected[this] val maxOffHeapMemory = conf.get(MEMORY_OFFHEAP_ENABLED)? conf.get(MEMORY_OFFHEAP_SIZE) : 0
6262
protected[this] val offHeapStorageMemory =
6363
(maxOffHeapMemory * conf.get(MEMORY_STORAGE_FRACTION)).toLong
6464

0 commit comments

Comments
 (0)