FelixYBW commented on code in PR #8477:
URL: https://github.com/apache/incubator-gluten/pull/8477#discussion_r1910885888


##########
cpp/core/memory/MemoryAllocator.cc:
##########
@@ -157,6 +157,9 @@ bool StdMemoryAllocator::reallocate(void* p, int64_t size, 
int64_t newSize, void
 }
 
 bool StdMemoryAllocator::reallocateAligned(void* p, uint64_t alignment, 
int64_t size, int64_t newSize, void** out) {
+  if (p == nullptr) {
+    throw gluten::GlutenException("p is nullptr");
+  }

Review Comment:
   Hongze means to use the Macro:  
   \` GLUTEN\_CHECK(p!=nullptr, "reallocate with nullptr");\`



-- 
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]

Reply via email to