bdk: fatfs: always align malloc to lba

This commit is contained in:
CTCaer 2024-03-12 15:43:44 +02:00
parent 7d1600b85c
commit 25b7ffecd1

View file

@ -18,7 +18,8 @@ void* ff_memalloc ( /* Returns pointer to the allocated memory block (null if no
UINT msize /* Number of bytes to allocate */
)
{
return malloc(msize); /* Allocate a new memory block with POSIX API */
// Ensure size is aligned to SDMMC block size.
return malloc(ALIGN(msize, 512)); /* Allocate a new memory block with POSIX API */
}