You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2023/06/19 08:37:42 UTC
[nuttx] 02/05: mm/mempool: Count the expend block overhead in mempool_info
This is an automated email from the ASF dual-hosted git repository.
pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 313f79d55ea7330bb0961c2eedf63d021137ba09
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun May 28 23:47:14 2023 +0800
mm/mempool: Count the expend block overhead in mempool_info
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
mm/mempool/mempool.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/mm/mempool/mempool.c b/mm/mempool/mempool.c
index 79c370e032..6aad183e96 100644
--- a/mm/mempool/mempool.c
+++ b/mm/mempool/mempool.c
@@ -369,6 +369,7 @@ int mempool_info(FAR struct mempool_s *pool, FAR struct mempoolinfo_s *info)
info->aordblks = pool->nalloc;
#endif
info->arena =
+ mempool_queue_lenth(&pool->equeue) * sizeof(sq_entry_t) +
(info->aordblks + info->ordblks + info->iordblks) * blocksize;
spin_unlock_irqrestore(&pool->lock, flags);
info->sizeblks = blocksize;