mirror of
https://github.com/Zygo/bees.git
synced 2025-07-01 00:02:27 +02:00
context: create a Pool of BtrfsIoctlLogicalInoArgs objects
Each object contains a 16 MiB buffer, which is very heavy for some malloc implementations. Keep the objects in a Pool so that their buffers are only allocated and deallocated once in the process lifetime. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
@ -714,6 +714,7 @@ class BeesContext : public enable_shared_from_this<BeesContext> {
|
||||
shared_ptr<BeesHashTable> m_hash_table;
|
||||
shared_ptr<BeesRoots> m_roots;
|
||||
Pool<BeesTempFile> m_tmpfile_pool;
|
||||
Pool<BtrfsIoctlLogicalInoArgs> m_logical_ino_pool;
|
||||
|
||||
LRUCache<BeesResolveAddrResult, BeesAddress> m_resolve_cache;
|
||||
|
||||
@ -753,6 +754,8 @@ public:
|
||||
|
||||
bool scan_forward(const BeesFileRange &bfr);
|
||||
|
||||
shared_ptr<BtrfsIoctlLogicalInoArgs> logical_ino(uint64_t bytenr, bool all_refs);
|
||||
|
||||
bool is_root_ro(uint64_t root);
|
||||
BeesRangePair dup_extent(const BeesFileRange &src, const shared_ptr<BeesTempFile> &tmpfile);
|
||||
bool dedup(const BeesRangePair &brp);
|
||||
|
Reference in New Issue
Block a user