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 2022/03/30 08:26:37 UTC

[GitHub] [incubator-nuttx-apps] pkarashchenko commented on a change in pull request #1112: testing/mm: add memory boundary realloc test.

pkarashchenko commented on a change in pull request #1112:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1112#discussion_r838258329



##########
File path: testing/mm/mm_main.c
##########
@@ -279,6 +283,127 @@ static void do_frees(FAR void **mem, FAR const int *size,
     }
 }
 
+static void realloc_boundary_free(void)
+{
+  dq_entry_t *tail;
+
+  /* Free all the memory in the relloc queue */
+
+  printf("Free all the memory in the relloc queue\n");
+
+  while (!dq_empty(&g_realloc_queue))
+    {
+      tail = dq_remlast(&g_realloc_queue);
+      if (tail != NULL)
+        {
+          free(tail);
+        }
+      else
+        {
+          DEBUGASSERT(false);

Review comment:
       So this assert will be hit before https://github.com/apache/incubator-nuttx/pull/5906 and will not be hit after it is merged?
   I just want to understand how this test case can help to detect the problem with existing code.




-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org