supprot cut for arg_cache

This commit is contained in:
pikastech 2022-10-08 22:15:53 +08:00
parent f717e9f91d
commit 3a7e5a90e9
3 changed files with 5 additions and 1 deletions

View File

@ -2,4 +2,4 @@
#define PIKA_VERSION_MINOR 11
#define PIKA_VERSION_MICRO 3
#define PIKA_EDIT_TIME "2022/10/08 12:27:54"
#define PIKA_EDIT_TIME "2022/10/08 22:15:51"

View File

@ -308,10 +308,12 @@ void mem_pool_init(void) {
}
void _mem_cache_deinit(void) {
#if PIKA_ARG_CACHE_ENABLE
while (pikaMemInfo.cache_pool_top) {
__user_free(pikaMemInfo.cache_pool[pikaMemInfo.cache_pool_top - 1], 0);
pikaMemInfo.cache_pool_top--;
}
#endif
}
void mem_pool_deinit(void) {

View File

@ -41,8 +41,10 @@
typedef struct {
uint32_t heapUsed;
uint32_t heapUsedMax;
#if PIKA_ARG_CACHE_ENABLE
uint8_t* cache_pool[PIKA_ARG_CACHE_POOL_SIZE];
uint32_t cache_pool_top;
#endif
uint32_t alloc_times;
uint32_t alloc_times_cache;
} PikaMemInfo;