FelixYBW commented on code in PR #8542:
URL: https://github.com/apache/incubator-gluten/pull/8542#discussion_r1917316651
##########
cpp/core/memory/MemoryAllocator.cc:
##########
@@ -121,6 +121,9 @@ void ListenableMemoryAllocator::updateUsage(int64_t size) {
}
bool StdMemoryAllocator::allocate(int64_t size, void** out) {
+ if (size < 0) {
+ return false;
+ }
Review Comment:
Let's use assert
--
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]