Furi: distinct name for auxiliary memory pool

This commit is contained in:
SG
2024-04-09 05:12:15 +03:00
parent 463dc8c727
commit 3a4bff82f4
7 changed files with 18 additions and 18 deletions

View File

@@ -425,8 +425,8 @@ void cli_command_free(Cli* cli, FuriString* args, void* context) {
printf("Minimum heap size: %zu\r\n", memmgr_get_minimum_free_heap()); printf("Minimum heap size: %zu\r\n", memmgr_get_minimum_free_heap());
printf("Maximum heap block: %zu\r\n", memmgr_heap_get_max_free_block()); printf("Maximum heap block: %zu\r\n", memmgr_heap_get_max_free_block());
printf("Pool free: %zu\r\n", memmgr_pool_get_free()); printf("Aux pool total free: %zu\r\n", memmgr_aux_pool_get_free());
printf("Maximum pool block: %zu\r\n", memmgr_pool_get_max_block()); printf("Aux pool max free block: %zu\r\n", memmgr_pool_get_max_block());
} }
typedef struct { typedef struct {

View File

@@ -78,14 +78,14 @@ void* __wrap__realloc_r(struct _reent* r, void* ptr, size_t size) {
return realloc(ptr, size); return realloc(ptr, size);
} }
void* memmgr_alloc_from_pool(size_t size) { void* memmgr_aux_pool_alloc(size_t size) {
void* p = furi_hal_memory_alloc(size); void* p = furi_hal_memory_alloc(size);
if(p == NULL) p = malloc(size); if(p == NULL) p = malloc(size);
return p; return p;
} }
size_t memmgr_pool_get_free(void) { size_t memmgr_aux_pool_get_free(void) {
return furi_hal_memory_get_free(); return furi_hal_memory_get_free();
} }

View File

@@ -51,22 +51,22 @@ void* aligned_malloc(size_t size, size_t alignment);
void aligned_free(void* p); void aligned_free(void* p);
/** /**
* @brief Allocate memory from separate memory pool. That memory can't be freed. * @brief Allocate memory from the auxiliary memory pool. That memory can't be freed.
* *
* @param size * @param size
* @return void* * @return void*
*/ */
void* memmgr_alloc_from_pool(size_t size); void* memmgr_aux_pool_alloc(size_t size);
/** /**
* @brief Get free memory pool size * @brief Get the auxiliary poll free memory size
* *
* @return size_t * @return size_t
*/ */
size_t memmgr_pool_get_free(void); size_t memmgr_aux_pool_get_free(void);
/** /**
* @brief Get max free block size from memory pool * @brief Get max free block size from the auxiliary memory pool
* *
* @return size_t * @return size_t
*/ */

View File

@@ -276,8 +276,8 @@ void furi_thread_start(FuriThread* thread) {
stack, stack,
thread, thread,
priority, priority,
memmgr_alloc_from_pool(sizeof(StackType_t) * stack), memmgr_aux_pool_alloc(sizeof(StackType_t) * stack),
memmgr_alloc_from_pool(sizeof(StaticTask_t))); memmgr_aux_pool_alloc(sizeof(StaticTask_t)));
} else { } else {
BaseType_t ret = xTaskCreate( BaseType_t ret = xTaskCreate(
furi_thread_body, thread->name, stack, thread, priority, &thread->task_handle); furi_thread_body, thread->name, stack, thread, priority, &thread->task_handle);

View File

@@ -1,5 +1,5 @@
entry,status,name,type,params entry,status,name,type,params
Version,+,61.0,, Version,+,61.1,,
Header,+,applications/services/bt/bt_service/bt.h,, Header,+,applications/services/bt/bt_service/bt.h,,
Header,+,applications/services/cli/cli.h,, Header,+,applications/services/cli/cli.h,,
Header,+,applications/services/cli/cli_vcp.h,, Header,+,applications/services/cli/cli_vcp.h,,
@@ -1972,7 +1972,8 @@ Function,+,memchr,void*,"const void*, int, size_t"
Function,+,memcmp,int,"const void*, const void*, size_t" Function,+,memcmp,int,"const void*, const void*, size_t"
Function,+,memcpy,void*,"void*, const void*, size_t" Function,+,memcpy,void*,"void*, const void*, size_t"
Function,-,memmem,void*,"const void*, size_t, const void*, size_t" Function,-,memmem,void*,"const void*, size_t, const void*, size_t"
Function,-,memmgr_alloc_from_pool,void*,size_t Function,-,memmgr_aux_pool_alloc,void*,size_t
Function,-,memmgr_aux_pool_get_free,size_t,
Function,+,memmgr_get_free_heap,size_t, Function,+,memmgr_get_free_heap,size_t,
Function,+,memmgr_get_minimum_free_heap,size_t, Function,+,memmgr_get_minimum_free_heap,size_t,
Function,+,memmgr_get_total_heap,size_t, Function,+,memmgr_get_total_heap,size_t,
@@ -1981,7 +1982,6 @@ Function,+,memmgr_heap_enable_thread_trace,void,FuriThreadId
Function,+,memmgr_heap_get_max_free_block,size_t, Function,+,memmgr_heap_get_max_free_block,size_t,
Function,+,memmgr_heap_get_thread_memory,size_t,FuriThreadId Function,+,memmgr_heap_get_thread_memory,size_t,FuriThreadId
Function,+,memmgr_heap_walk_blocks,void,"BlockWalker, void*" Function,+,memmgr_heap_walk_blocks,void,"BlockWalker, void*"
Function,-,memmgr_pool_get_free,size_t,
Function,-,memmgr_pool_get_max_block,size_t, Function,-,memmgr_pool_get_max_block,size_t,
Function,+,memmove,void*,"void*, const void*, size_t" Function,+,memmove,void*,"void*, const void*, size_t"
Function,-,mempcpy,void*,"void*, const void*, size_t" Function,-,mempcpy,void*,"void*, const void*, size_t"
1 entry status name type params
2 Version + 61.0 61.1
3 Header + applications/services/bt/bt_service/bt.h
4 Header + applications/services/cli/cli.h
5 Header + applications/services/cli/cli_vcp.h
1972 Function + memcmp int const void*, const void*, size_t
1973 Function + memcpy void* void*, const void*, size_t
1974 Function - memmem void* const void*, size_t, const void*, size_t
1975 Function - memmgr_alloc_from_pool memmgr_aux_pool_alloc void* size_t
1976 Function - memmgr_aux_pool_get_free size_t
1977 Function + memmgr_get_free_heap size_t
1978 Function + memmgr_get_minimum_free_heap size_t
1979 Function + memmgr_get_total_heap size_t
1982 Function + memmgr_heap_get_max_free_block size_t
1983 Function + memmgr_heap_get_thread_memory size_t FuriThreadId
1984 Function + memmgr_heap_walk_blocks void BlockWalker, void*
Function - memmgr_pool_get_free size_t
1985 Function - memmgr_pool_get_max_block size_t
1986 Function + memmove void* void*, const void*, size_t
1987 Function - mempcpy void* void*, const void*, size_t

View File

@@ -1,5 +1,5 @@
entry,status,name,type,params entry,status,name,type,params
Version,+,61.0,, Version,+,61.1,,
Header,+,applications/drivers/subghz/cc1101_ext/cc1101_ext_interconnect.h,, Header,+,applications/drivers/subghz/cc1101_ext/cc1101_ext_interconnect.h,,
Header,+,applications/services/bt/bt_service/bt.h,, Header,+,applications/services/bt/bt_service/bt.h,,
Header,+,applications/services/cli/cli.h,, Header,+,applications/services/cli/cli.h,,
@@ -2363,7 +2363,8 @@ Function,+,memchr,void*,"const void*, int, size_t"
Function,+,memcmp,int,"const void*, const void*, size_t" Function,+,memcmp,int,"const void*, const void*, size_t"
Function,+,memcpy,void*,"void*, const void*, size_t" Function,+,memcpy,void*,"void*, const void*, size_t"
Function,-,memmem,void*,"const void*, size_t, const void*, size_t" Function,-,memmem,void*,"const void*, size_t, const void*, size_t"
Function,-,memmgr_alloc_from_pool,void*,size_t Function,-,memmgr_aux_pool_alloc,void*,size_t
Function,-,memmgr_aux_pool_get_free,size_t,
Function,+,memmgr_get_free_heap,size_t, Function,+,memmgr_get_free_heap,size_t,
Function,+,memmgr_get_minimum_free_heap,size_t, Function,+,memmgr_get_minimum_free_heap,size_t,
Function,+,memmgr_get_total_heap,size_t, Function,+,memmgr_get_total_heap,size_t,
@@ -2372,7 +2373,6 @@ Function,+,memmgr_heap_enable_thread_trace,void,FuriThreadId
Function,+,memmgr_heap_get_max_free_block,size_t, Function,+,memmgr_heap_get_max_free_block,size_t,
Function,+,memmgr_heap_get_thread_memory,size_t,FuriThreadId Function,+,memmgr_heap_get_thread_memory,size_t,FuriThreadId
Function,+,memmgr_heap_walk_blocks,void,"BlockWalker, void*" Function,+,memmgr_heap_walk_blocks,void,"BlockWalker, void*"
Function,-,memmgr_pool_get_free,size_t,
Function,-,memmgr_pool_get_max_block,size_t, Function,-,memmgr_pool_get_max_block,size_t,
Function,+,memmove,void*,"void*, const void*, size_t" Function,+,memmove,void*,"void*, const void*, size_t"
Function,-,mempcpy,void*,"void*, const void*, size_t" Function,-,mempcpy,void*,"void*, const void*, size_t"
1 entry status name type params
2 Version + 61.0 61.1
3 Header + applications/drivers/subghz/cc1101_ext/cc1101_ext_interconnect.h
4 Header + applications/services/bt/bt_service/bt.h
5 Header + applications/services/cli/cli.h
2363 Function + memcmp int const void*, const void*, size_t
2364 Function + memcpy void* void*, const void*, size_t
2365 Function - memmem void* const void*, size_t, const void*, size_t
2366 Function - memmgr_alloc_from_pool memmgr_aux_pool_alloc void* size_t
2367 Function - memmgr_aux_pool_get_free size_t
2368 Function + memmgr_get_free_heap size_t
2369 Function + memmgr_get_minimum_free_heap size_t
2370 Function + memmgr_get_total_heap size_t
2373 Function + memmgr_heap_get_max_free_block size_t
2374 Function + memmgr_heap_get_thread_memory size_t FuriThreadId
2375 Function + memmgr_heap_walk_blocks void BlockWalker, void*
Function - memmgr_pool_get_free size_t
2376 Function - memmgr_pool_get_max_block size_t
2377 Function + memmove void* void*, const void*, size_t
2378 Function - mempcpy void* void*, const void*, size_t

View File

@@ -19,7 +19,7 @@ static SectorCache* cache = NULL;
void sector_cache_init(void) { void sector_cache_init(void) {
if(cache == NULL) { if(cache == NULL) {
cache = memmgr_alloc_from_pool(sizeof(SectorCache)); cache = memmgr_aux_pool_alloc(sizeof(SectorCache));
} }
if(cache != NULL) { if(cache != NULL) {