Took advantage of file buffer layout to pass as lfsr_data_t directly

This would have been more valuable if the extra lfsr_data_t stack
allocation (12 bytes) wasn't already unioned with the btree's encoding
buffer allocation (18 bytes):

           code          stack
  before: 33714           2640
  after:  33702 (-0.0%)   2640 (+0.0%)

Oh well, this still might save some stack in the future if things shift
around.
This commit is contained in:
Christopher Haster
2024-05-14 14:14:54 -05:00
parent 186fd1b5f2
commit e80c907ff8
2 changed files with 5 additions and 8 deletions
+2 -1
View File
@@ -519,10 +519,11 @@ typedef struct lfsr_file {
lfsr_bshrub_t bshrub_;
lfs_off_t pos;
// note this lines up with lfsr_data_t's buffer representation
struct {
lfs_off_t pos;
lfs_off_t size;
uint8_t *buffer;
lfs_off_t pos;
} buffer;
lfs_block_t eblock;