mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-24 05:34:45 -07:00
aligned_alloc: check that alignment is correct
This commit is contained in:
@@ -246,6 +246,11 @@ extern void* pvPortAllocAligned(size_t xSize, size_t xAlignment) {
|
|||||||
furi_crash("memmgt in ISR");
|
furi_crash("memmgt in ISR");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// alignment must be power of 2
|
||||||
|
if((xAlignment & (xAlignment - 1)) != 0) {
|
||||||
|
furi_crash("invalid alignment");
|
||||||
|
}
|
||||||
|
|
||||||
memmgr_lock();
|
memmgr_lock();
|
||||||
|
|
||||||
// allocate block
|
// allocate block
|
||||||
|
|||||||
Reference in New Issue
Block a user