mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:17:44 +00:00
LibSQL: Reuse heap blocks when overwriting storage
Previously, only the first block in a chain of blocks would be overwritten while all subsequent blocks would be appended to the heap. Now we make sure to reuse all existing blocks in the chain.
This commit is contained in:
parent
2d2911e1a3
commit
c5ebc4bb40
3 changed files with 68 additions and 3 deletions
|
@ -71,6 +71,8 @@ public:
|
|||
virtual ~Heap() override;
|
||||
|
||||
ErrorOr<void> open();
|
||||
ErrorOr<size_t> file_size_in_bytes() const;
|
||||
|
||||
bool has_block(Block::Index) const;
|
||||
[[nodiscard]] Block::Index request_new_block_index() { return m_next_block++; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue