mempool:Allocate a chunk for multiple mempool avoid memory fragmentation

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
This commit is contained in:
anjiahao
2023-05-26 10:42:50 +08:00
committed by Xiang Xiao
parent acb3ac95da
commit 6572081e07
5 changed files with 146 additions and 41 deletions
+3 -2
View File
@@ -322,6 +322,7 @@ void mempool_procfs_unregister(FAR struct mempool_procfs_entry_s *entry);
* alloc - The alloc memory function for multiples pool.
* free - The free memory function for multiples pool.
* arg - The alloc & free memory fuctions used arg.
* chunksize - The multiples pool chunk size.
* expandsize - The expend mempry for all pools in multiples pool.
* dict_expendsize - The expend size for multiple dictnoary.
* Returned Value:
@@ -336,8 +337,8 @@ FAR struct mempool_multiple_s *
mempool_multiple_init(FAR const char *name,
FAR size_t *poolsize, size_t npools,
mempool_multiple_alloc_t alloc,
mempool_multiple_free_t free,
FAR void *arg, size_t expandsize,
mempool_multiple_free_t free, FAR void *arg,
size_t chunksize, size_t expandsize,
size_t dict_expendsize);
/****************************************************************************