hsiang-c commented on code in PR #2122:
URL: https://github.com/apache/datafusion-comet/pull/2122#discussion_r2267838733
##########
spark/src/main/java/org/apache/spark/shuffle/comet/CometUnifiedShuffleMemoryAllocator.java:
##########
@@ -58,6 +58,11 @@ public synchronized MemoryBlock allocate(long required) {
}
public synchronized void free(MemoryBlock block) {
+ if (block.pageNumber == MemoryBlock.FREED_IN_ALLOCATOR_PAGE_NUMBER
Review Comment:
Do we have to check `MemoryBlock.NO_PAGE_NUMBER` so that TMM's `freePage()`
doesn't complain?
```java
// `org.apache.spark.memory.TaskMemoryManager`
public void freePage(MemoryBlock page, MemoryConsumer consumer) {
assert (page.pageNumber != MemoryBlock.NO_PAGE_NUMBER) :
"Called freePage() on memory that wasn't allocated with
allocatePage()";
```
--
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]