Skip to content

Commit

Permalink
Fix size.ml doc.
Browse files Browse the repository at this point in the history
  • Loading branch information
lyrm committed Jan 7, 2025
1 parent 88cfb69 commit 8797cea
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/size.ml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ module Snapshot = struct
(** We use an optimized flat representation where the first element of the
array holds the status of the snapshot.
+--------+---------+---------+---------+- - - | status | counter | counter
| counter | ... +--------+---------+---------+---------+- - -
+--------+---------+---------+---------+- - -
| status | counter | counter | counter | ...
+--------+---------+---------+---------+- - -
The status is either {!collecting}, {!computing}, or a non-negative value.
Expand Down Expand Up @@ -102,8 +105,11 @@ type t = tx Atomic.t array Atomic.t
(** We use an optimized flat representation where the first element of the array
holds a reference to the snapshot and the other elements are the counters.
+----------+------+------+------+------+- - - | snapshot | decr | incr |
decr | incr | ... +----------+------+------+------+------+- - -
+----------+------+------+------+------+- - -
| snapshot | decr | incr | decr | incr | ...
+----------+------+------+------+------+- - -
Counters at odd numbered indices are for [decr]ements and the counters at
even numbered indices are for [incr]ements.
Expand Down

0 comments on commit 8797cea

Please sign in to comment.