-
Notifications
You must be signed in to change notification settings - Fork 15
/
slopbucket-notes.txt
43 lines (31 loc) · 961 Bytes
/
slopbucket-notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// LobHash
//
// [8 bytes] Next free pointer
// Data file
// Entries for tables
// Series of table pointers followed by names
// [8 bytes] pointer
// [256 table name]
// Hash Tables
// Table size [4 bytes]
// Table item count [4 bytes]
// Next table pointer [8 bytes]
// Followed by N table entries, which are [8 byte] pointers
// Regular Entry
// [2 byte] key size
// [key data]
// [4 byte] data size
// [data]
// List Entry
// [2 byte] key size
// [key data]
// [8 byte] next pointer (or zeros)
// [4 byte] data size
// [data]
// Add list: look up entry, add new entry, point new entry to prev entry,
// save pointer to new entry
// Tables - Read from newest table first, so on startup read down to get a list of all hash tables to work backwards from
//
// Table start size 1024k * 8 = 8mb of space
// Each table increases size by 8x, so even a 1 billion node table would only be 4 or 5 hash table lookups.
// Keep the table fill percentage low