You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/01/14 14:42:04 UTC

[GitHub] [incubator-nuttx] davids5 commented on a change in pull request #2675: Add placement new and new[] function.

davids5 commented on a change in pull request #2675:
URL: https://github.com/apache/incubator-nuttx/pull/2675#discussion_r557443881



##########
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:
       What is placement? Failed allocation?




----------------------------------------------------------------
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:
users@infra.apache.org