From 00705b15a5feca39a6a0fa7324d204e901f12149 Mon Sep 17 00:00:00 2001 From: Christopher Haster Date: Fri, 18 Apr 2025 18:02:33 -0500 Subject: [PATCH] Reduced lfsr_file_carve's rattr scratch buffer 5 -> 3 This should have been updated when we dropped becksums (way back in 5fa85583!), we only ever need at most 3 rattrs to complete a carve operation (left sibling, rattr, right sibling). Just a free 24 byte stack savings sitting right there: code stack ctx before: 35600 2480 640 after: 35600 (+0.0%) 2456 (-1.0%) 640 (+0.0%) --- lfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lfs.c b/lfs.c index 338005ab..d20ab71c 100644 --- a/lfs.c +++ b/lfs.c @@ -11559,7 +11559,7 @@ static int lfsr_file_carve(lfs_t *lfs, lfsr_file_t *file, // try to merge commits where possible lfsr_bid_t bid = file->b.shrub.weight; - lfsr_rattr_t rattrs[5]; + lfsr_rattr_t rattrs[3]; lfs_size_t rattr_count = 0; lfsr_bptr_t l; lfsr_bptr_t r;