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/05/20 16:14:40 UTC
[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #6305: Separate a few debug stuff from CONFIG_DEBUG_MM
pkarashchenko commented on code in PR #6305:
URL: https://github.com/apache/incubator-nuttx/pull/6305#discussion_r878320285
##########
mm/mm_heap/mm_malloc.c:
##########
@@ -244,15 +244,18 @@ FAR void *mm_malloc(FAR struct mm_heap_s *heap, size_t size)
#ifdef CONFIG_DEBUG_MM
else
{
+#ifdef CONFIG_MM_DUMP_ON_FAILURE
struct mallinfo minfo;
+#endif
mwarn("WARNING: Allocation failed, size %zu\n", alignsize);
+#ifdef CONFIG_MM_DUMP_ON_FAILURE
mm_mallinfo(heap, &minfo);
mwarn("Total:%d, used:%d, free:%d, largest:%d, nused:%d, nfree:%d\n",
minfo.arena, minfo.uordblks, minfo.fordblks,
minfo.mxordblk, minfo.aordblks, minfo.ordblks);
mm_memdump(heap, -1);
- DEBUGASSERT(false);
+#endif
Review Comment:
Yes. There is an explanation in commit message. Maybe debug assert should be optional, I do not know.
--
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