xiaoxiang781216 commented on a change in pull request #2675: URL: https://github.com/apache/incubator-nuttx/pull/2675#discussion_r557457814
########## File path: libs/libxx/libxx_new.cxx ########## @@ -88,3 +88,18 @@ FAR void *operator new(std::size_t nbytes) return alloc; } + +FAR void *operator new(std::size_t nbytes, FAR void *ptr) +{ + +#ifdef CONFIG_DEBUG_ERROR + if (ptr == nullptr) + { + _err("ERROR: Failed to placement new\n"); Review comment: placement new never fail, here has some explanation: https://en.wikipedia.org/wiki/Placement_syntax ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org