Cleanup, fixed inconsistent names, moved btree attr allocation up
- len => size - these all refer to byte-arrays - buf => buffer - this doesn't matter but buffer is currently used more - delta => d - we use delta for weight deltas, gstate deltas, using a slightly different name (if somehow even less descriptive) for byte offset-offsets helps avoid name collisions a little bit The storage changes in btree operations should've probably been a separate commit but got wrapped up in these changes. Now the high-level btree operations are responsible to the attr storage for all internal btree commits, as defined by LFSR_BTREE_SCRATCHATTRS. This leads to slightly less total RAM usage, since it allows the low-level btree operations to cannibilize the attrs of the high-level btree operations as a part of its unrolled-tail-recursive implementation. This also includes some other cleanup such as removing old commented out parts.
This commit is contained in:
@@ -373,8 +373,8 @@ typedef union lfsr_btree {
|
||||
struct {
|
||||
lfs_ssize_t weight;
|
||||
lfsr_tag_t tag;
|
||||
uint16_t len;
|
||||
uint8_t buf[LFSR_BTREE_INLINE_SIZE];
|
||||
uint16_t size;
|
||||
uint8_t buffer[LFSR_BTREE_INLINE_SIZE];
|
||||
} inlined;
|
||||
} lfsr_btree_t;
|
||||
|
||||
@@ -391,7 +391,7 @@ typedef union lfsr_btree {
|
||||
// union {
|
||||
// struct {
|
||||
// uint8_t size;
|
||||
// uint8_t buf[LFSR_BTREE_INLINE_SIZE];
|
||||
// uint8_t buffer[LFSR_BTREE_INLINE_SIZE];
|
||||
// } inlined;
|
||||
//
|
||||
// // if we're not inlined, point to the trunk rbyd block of the btree
|
||||
|
||||
Reference in New Issue
Block a user