Lines Matching refs:slice
81 …slice-based organisation described below, where each slice is allocated for the long term. In part…
85 Some parts of the key slot management code use **key slices** as an abstraction. A key slice is an …
87 * With a [static key store](#static-key-store), there is a single, statically allocated slice, with…
88 …e is statically allocated array of pointers to key slices. The index of a slice is the index in th…
92 …slice containing the slot and index of the slot in its slice determine the key identifier. When ac…
133 One key slice contains only loaded keys: that key slice is thus the cache slice. See [“Persistent k…
137 A volatile key identifier encodes the slice index and the slot index at separate bit positions. Tha…
139 #### From key slot to key slice
141 …de need to determine which key slice contains a key slot when given a pointer to the key slot. In …
143 * for a volatile key identifier, the [slice index is encoded in the key identifier](#volatile-key-i…
144 * for a persistent key identifier or built-in key identifier, [the slot is in the sole cache slice]…
146 Nonetheless, we store the slice index as a field in the slot, for two reasons:
148 * It is more robust in case the slice assignment becomes more complex in the future or is somehow b…
149 …slice correspondence to work even if the key identifier field has not been filled yet or has been …
153 …ve exponentially increasing length: each slice is twice as long as the previous one. Thus if the l…
161 …slice has a **free list**. This is a linked list of all the slots in the slice that are free. The …
163 …slice freshly obtained from `calloc` has all of its slots in the free list in order. The value 1 i…
167 …cated slice until it finds a slice that is not full. If all allocated slices are full, the code al…
169 The newly allocated slot is removed from the slice's free list.
171 We only allocate a slice of size `B * 2^k` if there are already `B * (2^k - 1)` occupied slots. Thu…
177 ##### Future improvement: slice deallocation
181 …slice as soon as it becomes empty, because that would cause large allocations and deallocations if…
183 Note that currently, the slice array contains one sequence of allocated slices followed by one sequ…
206 A key slot must be allocated in the cache slice:
212 If the cache slice is full, the code will try to evict an entry. Only slots that do not have reader…