Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zephyr integration: Use K_HEAP_MEM_POOL_SIZE #280

Merged
merged 1 commit into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/system/zephyr/alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <metal/alloc.h>
#include <metal/compiler.h>

#if (CONFIG_HEAP_MEM_POOL_SIZE <= 0)
#if (K_HEAP_MEM_POOL_SIZE <= 0)

void *metal_weak metal_zephyr_allocate_memory(unsigned int size)
{
Expand All @@ -25,4 +25,4 @@ void metal_weak metal_zephyr_free_memory(void *ptr)
(void)ptr;
}

#endif /* CONFIG_HEAP_MEM_POOL_SIZE */
#endif /* K_HEAP_MEM_POOL_SIZE */
4 changes: 2 additions & 2 deletions lib/system/zephyr/alloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
extern "C" {
#endif

#if (CONFIG_HEAP_MEM_POOL_SIZE > 0)
#if (K_HEAP_MEM_POOL_SIZE > 0)
static inline void *__metal_allocate_memory(unsigned int size)
{
return k_malloc(size);
Expand All @@ -47,7 +47,7 @@ static inline void __metal_free_memory(void *ptr)
{
metal_zephyr_free_memory(ptr);
}
#endif /* CONFIG_HEAP_MEM_POOL_SIZE */
#endif /* K_HEAP_MEM_POOL_SIZE */


#ifdef __cplusplus
Expand Down