jinchengchenghh commented on code in PR #9075:
URL: https://github.com/apache/incubator-gluten/pull/9075#discussion_r2007284402
##########
backends-velox/src/main/scala/org/apache/spark/sql/execution/unsafe/UnsafeBytesBufferArray.scala:
##########
@@ -79,7 +75,17 @@ case class UnsafeBytesBufferArray(
assert(bytesBuffer.length == bytesBufferLengths(index))
// first to allocate underlying long array
if (null == longArray && index == 0) {
- longArray = allocateArray((totalBytes + 7) / 8)
+ val numBytes = totalBytes + 7
Review Comment:
Why the numBytes is not (totalBytes + 7) / 8
##########
backends-velox/src/main/scala/org/apache/spark/sql/execution/unsafe/UnsafeBytesBufferArray.scala:
##########
@@ -132,8 +138,8 @@ case class UnsafeBytesBufferArray(
override def finalize(): Unit = {
try {
if (longArray != null) {
- freeArray(longArray)
longArray = null
+ GlobalOffHeapMemory.release(longArray.size())
Review Comment:
call longArray.size() after set it to null
--
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]