You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2024/10/17 01:05:18 UTC
(nuttx) branch master updated (394530e3c2 -> 5aa48061c9)
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
from 394530e3c2 ci: documentation workflow is now only triggered when the Documentation subdirectory has modifications, and does not build pdfs.
new 62850f3163 mempool:when deinit mempool,need mark dict NULL before free
new 9c6c56c255 mempool: use backtrace_format
new 5aa48061c9 mm: fix mempool default recording backtrace
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
mm/mempool/mempool.c | 19 +++++++------------
mm/mempool/mempool_multiple.c | 3 ++-
2 files changed, 9 insertions(+), 13 deletions(-)
(nuttx) 01/03: mempool:when deinit mempool,need mark dict NULL before free
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 62850f31635c96c7de85ef3601d586441ed29ffd
Author: anjiahao <an...@xiaomi.com>
AuthorDate: Thu Jun 6 14:58:45 2024 +0800
mempool:when deinit mempool,need mark dict NULL before free
Signed-off-by: anjiahao <an...@xiaomi.com>
---
mm/mempool/mempool_multiple.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/mm/mempool/mempool_multiple.c b/mm/mempool/mempool_multiple.c
index d165c665aa..30b2928740 100644
--- a/mm/mempool/mempool_multiple.c
+++ b/mm/mempool/mempool_multiple.c
@@ -303,7 +303,7 @@ mempool_multiple_get_dict(FAR struct mempool_multiple_s *mpool,
size_t row;
size_t col;
- if (mpool == NULL || blk == NULL)
+ if (mpool == NULL || blk == NULL || mpool->dict == NULL)
{
return NULL;
}
@@ -888,6 +888,7 @@ void mempool_multiple_deinit(FAR struct mempool_multiple_s *mpool)
}
mempool_multiple_free_chunk(mpool, mpool->dict);
+ mpool->dict = NULL;
nxrmutex_destroy(&mpool->lock);
mpool->free(mpool->arg, mpool);
}
(nuttx) 02/03: mempool: use backtrace_format
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 9c6c56c25578f5e43da8a199e7884ef1aa97ad41
Author: Neo Xu <ne...@gmail.com>
AuthorDate: Wed Oct 16 15:03:11 2024 +0800
mempool: use backtrace_format
There's no need to manually format the backtrace any more.
Signed-off-by: Neo Xu <ne...@gmail.com>
---
mm/mempool/mempool.c | 17 +++++------------
1 file changed, 5 insertions(+), 12 deletions(-)
diff --git a/mm/mempool/mempool.c b/mm/mempool/mempool.c
index cfac830743..655906f4ea 100644
--- a/mm/mempool/mempool.c
+++ b/mm/mempool/mempool.c
@@ -197,20 +197,13 @@ static void mempool_memdump_callback(FAR struct mempool_s *pool,
if ((MM_DUMP_ASSIGN(dump, buf) || MM_DUMP_ALLOC(dump, buf) ||
MM_DUMP_LEAK(dump, buf)) && MM_DUMP_SEQNO(dump, buf))
{
- char tmp[BACKTRACE_BUFFER_SIZE(CONFIG_MM_BACKTRACE)];
-
# if CONFIG_MM_BACKTRACE > 0
- FAR const char *format = " %0*p";
- int i;
+ char tmp[BACKTRACE_BUFFER_SIZE(CONFIG_MM_BACKTRACE)];
- for (i = 0; i < CONFIG_MM_BACKTRACE &&
- buf->backtrace[i]; i++)
- {
- snprintf(tmp + i * BACKTRACE_PTR_FMT_WIDTH,
- sizeof(tmp) - i * BACKTRACE_PTR_FMT_WIDTH,
- format, BACKTRACE_PTR_FMT_WIDTH - 1,
- buf->backtrace[i]);
- }
+ backtrace_format(tmp, sizeof(tmp), buf->backtrace,
+ CONFIG_MM_BACKTRACE);
+# else
+ FAR const char *tmp = "";
# endif
syslog(LOG_INFO, "%6d%12zu%12lu%*p%s\n",
(nuttx) 03/03: mm: fix mempool default recording backtrace
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 5aa48061c9da5268e0a9b749f9974f5a08af3451
Author: yinshengkai <yi...@xiaomi.com>
AuthorDate: Wed Apr 10 13:41:50 2024 +0800
mm: fix mempool default recording backtrace
Need to initialize procfs.backtrace to false if it's disabled.
Signed-off-by: yinshengkai <yi...@xiaomi.com>
---
mm/mempool/mempool.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mm/mempool/mempool.c b/mm/mempool/mempool.c
index 655906f4ea..4ea7a9e783 100644
--- a/mm/mempool/mempool.c
+++ b/mm/mempool/mempool.c
@@ -312,6 +312,8 @@ int mempool_init(FAR struct mempool_s *pool, FAR const char *name)
mempool_procfs_register(&pool->procfs, name);
# ifdef CONFIG_MM_BACKTRACE_DEFAULT
pool->procfs.backtrace = true;
+# elif CONFIG_MM_BACKTRACE > 0
+ pool->procfs.backtrace = false;
# endif
#endif