From eb013e6dd6e1cb26e430c632c762436a81a11522 Mon Sep 17 00:00:00 2001 From: "Peter A. Bigot" Date: Tue, 23 Jul 2019 11:05:04 -0500 Subject: [PATCH] lfs: correct documentation on lookahead-related values The size of the lookahead buffer is required to be a multiple of 8 bytes in anticipation of a future improvement. The buffer itself need only be aligned to support access through a uint32_t pointer. Signed-off-by: Peter A. Bigot --- lfs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lfs.h b/lfs.h index c78b3d6..d09124b 100644 --- a/lfs.h +++ b/lfs.h @@ -204,7 +204,7 @@ struct lfs_config { // Size of the lookahead buffer in bytes. A larger lookahead buffer // increases the number of blocks found during an allocation pass. The // lookahead buffer is stored as a compact bitmap, so each byte of RAM - // can track 8 blocks. Must be a multiple of 4. + // can track 8 blocks. Must be a multiple of 8. lfs_size_t lookahead_size; // Optional statically allocated read buffer. Must be cache_size. @@ -216,7 +216,7 @@ struct lfs_config { void *prog_buffer; // Optional statically allocated lookahead buffer. Must be lookahead_size - // and aligned to a 64-bit boundary. By default lfs_malloc is used to + // and aligned to a 32-bit boundary. By default lfs_malloc is used to // allocate this buffer. void *lookahead_buffer;