mirror of
https://github.com/Zygo/bees.git
synced 2025-06-17 01:56:16 +02:00
hash: create beeshash.dat if it does not exist
BeesHashTable can now create a beeshash.dat if the file does not already exist. Currently the default size is one hash table extent (16MB) and there's no way to change that (yet), so users should still create their own hash tables for now. The opening of the hash table is deferred (slightly) in preparation for hash table resizing. No doc as the feature is currently unfinished.
This commit is contained in:
@ -411,7 +411,7 @@ public:
|
||||
uint8_t p_byte[BLOCK_SIZE_HASHTAB_EXTENT];
|
||||
} __attribute__((packed));
|
||||
|
||||
BeesHashTable(shared_ptr<BeesContext> ctx, string filename);
|
||||
BeesHashTable(shared_ptr<BeesContext> ctx, string filename, off_t size = BLOCK_SIZE_HASHTAB_EXTENT);
|
||||
~BeesHashTable();
|
||||
|
||||
vector<Cell> find_cell(HashType hash);
|
||||
@ -458,6 +458,7 @@ private:
|
||||
|
||||
DefaultBool m_shared;
|
||||
|
||||
void open_file();
|
||||
void writeback_loop();
|
||||
void prefetch_loop();
|
||||
void try_mmap_flags(int flags);
|
||||
|
Reference in New Issue
Block a user