You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "pkarashchenko (via GitHub)" <gi...@apache.org> on 2023/02/12 16:52:40 UTC

[GitHub] [nuttx] pkarashchenko commented on a diff in pull request #8511: fix mempool bug,when use MM_BACKTRACE

pkarashchenko commented on code in PR #8511:
URL: https://github.com/apache/nuttx/pull/8511#discussion_r1103834871


##########
include/nuttx/mm/mempool.h:
##########
@@ -34,6 +34,18 @@
 #include <nuttx/spinlock.h>
 #include <nuttx/semaphore.h>
 
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+#if CONFIG_MM_BACKTRACE >= 0
+#define MEMPOOL_REALBLOCKSIZE(pool) (ALIGN_UP(pool->blocksize + \

Review Comment:
   ```suggestion
   #  define MEMPOOL_REALBLOCKSIZE(pool) (ALIGN_UP(pool->blocksize + \
   ```
   



##########
include/nuttx/mm/mempool.h:
##########
@@ -34,6 +34,18 @@
 #include <nuttx/spinlock.h>
 #include <nuttx/semaphore.h>
 
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+#if CONFIG_MM_BACKTRACE >= 0
+#define MEMPOOL_REALBLOCKSIZE(pool) (ALIGN_UP(pool->blocksize + \
+                                     sizeof(struct mempool_backtrace_s), \
+                                     pool->blockalign))
+#else
+#define MEMPOOL_REALBLOCKSIZE(pool) (pool->blocksize)

Review Comment:
   ```suggestion
   #  define MEMPOOL_REALBLOCKSIZE(pool) (pool->blocksize)
   ```
   



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