We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
put
1 parent 886ec39 commit 092418bCopy full SHA for 092418b
src/lib/disk_cache/lmdb/disk_cache.ml
@@ -42,8 +42,11 @@ module Make (Data : Binable.S) = struct
42
let idx =
43
match Queue.dequeue reusable_keys with
44
| None ->
45
+ (* We don't have reusable keys, assign a new one nobody ever used *)
46
incr counter ; !counter - 1
47
| Some reused_key ->
48
+ (* Any key inside [reusable_keys] is marked as garbage by GC, so we're
49
+ free to use them *)
50
reused_key
51
in
52
let res = { idx } in
0 commit comments