zhztheplayer commented on code in PR #5439:
URL: https://github.com/apache/incubator-gluten/pull/5439#discussion_r1593670874
##########
gluten-core/src/main/java/org/apache/gluten/memory/memtarget/MemoryTargets.java:
##########
@@ -54,6 +54,13 @@ public static MemoryTarget newConsumer(
} else {
factory = TreeMemoryConsumers.shared();
}
- return factory.newConsumer(tmm, name, spillers, virtualChildren);
+
+ final MemoryTarget memoryTarget = factory.newConsumer(tmm, name, spillers,
virtualChildren);
+
+ if (GlutenConfig.getConf().dynamicOffHeapSizingEnabled()) {
+ return new DynamicOffHeapSizingMemoryTarget(memoryTarget);
+ }
+
+ return memoryTarget;
Review Comment:
Can we add another method to do this wrapping? E.g.,
```java
public static MemoryTarget dynamicOffHeapSizing(MemoryTarget target) {
...
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]