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
2 changes: 1 addition & 1 deletion zephyr/lib/alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ static void *virtual_heap_alloc(struct vmh_heap *heap, uint32_t flags, size_t by
if (!mem)
return NULL;

assert(IS_ALIGNED(mem, align));
assert(align == 0 || IS_ALIGNED(mem, align));
Copy link

Copilot AI Oct 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The condition align == 0 may be misleading since zero is not a valid alignment value for memory operations. Consider checking if align is a power of 2 when non-zero, or document that zero specifically means 'no alignment requirement' to clarify the API contract.

Copilot uses AI. Check for mistakes.

if (flags & SOF_MEM_FLAG_COHERENT)
return sys_cache_uncached_ptr_get((__sparse_force void __sparse_cache *)mem);
Expand Down
Loading