Merge pull request #912 from littlefs-project/relaxed-lookahead

Relaxed lookahead alignment, other internal block alloc readability improvements
This commit is contained in:
Christopher Haster
2024-01-19 12:27:14 -06:00
committed by GitHub
4 changed files with 90 additions and 71 deletions

View File

@@ -221,7 +221,9 @@ uint32_t lfs_crc(uint32_t crc, const void *buffer, size_t size);
#endif
// Allocate memory, only used if buffers are not provided to littlefs
// Note, memory must be 64-bit aligned
//
// littlefs current has no alignment requirements, as it only allocates
// byte-level buffers.
static inline void *lfs_malloc(size_t size) {
#if defined(LFS_MALLOC)
return LFS_MALLOC(size);