Skip to content
Merged
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
9 changes: 5 additions & 4 deletions zephyr/lib/alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -657,9 +657,7 @@ static int heap_init(void)
#endif

#if CONFIG_L3_HEAP
if (l3_heap_copy.heap.heap) {
l3_heap = l3_heap_copy;
} else if (ace_imr_used()) {
if (ace_imr_used()) {
void *l3_heap_start = UINT_TO_POINTER(get_l3_heap_start());
size_t l3_heap_size = get_l3_heap_size();
#if CONFIG_MMU
Expand All @@ -668,7 +666,10 @@ static int heap_init(void)

arch_mem_map(l3_heap_start, va, l3_heap_size, K_MEM_PERM_RW | K_MEM_CACHE_WB);
#endif
sys_heap_init(&l3_heap.heap, l3_heap_start, l3_heap_size);
if (l3_heap_copy.heap.heap)
l3_heap = l3_heap_copy;
else
sys_heap_init(&l3_heap.heap, l3_heap_start, l3_heap_size);
}
#endif

Expand Down
Loading