Github user jiangxb1987 commented on a diff in the pull request: https://github.com/apache/spark/pull/19077#discussion_r144037194 --- Diff: common/unsafe/src/main/java/org/apache/spark/unsafe/memory/MemoryBlock.java --- @@ -48,6 +49,15 @@ public long size() { } /** + * Reset the size of the memory block. + */ + public void resetSize(long len) { + assert (ByteArrayMethods.roundNumberOfBytesToNearestWord(length) == --- End diff -- Also leave some message if the check fails.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org