Github user viirya commented on a diff in the pull request: https://github.com/apache/spark/pull/19222#discussion_r171787333 --- Diff: common/unsafe/src/main/java/org/apache/spark/unsafe/memory/UnsafeMemoryAllocator.java --- @@ -36,22 +42,35 @@ public MemoryBlock allocate(long size) throws OutOfMemoryError { @Override public void free(MemoryBlock memory) { - assert (memory.obj == null) : + if (memory == OffHeapMemoryBlock.NULL) return; + assert(memory instanceof OffHeapMemoryBlock); --- End diff -- I think this assert should be in front of `if (memory == OffHeapMemoryBlock.NULL) return;`?
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org