diff options
| author | eunhhu <[email protected]> | 2026-09-30 02:25:43 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-09-30 02:25:43 +0100 |
| commit | d1e8f38f100571d55aaa98527ae2873e6d247f80 (patch) | |
| tree | 216998a90e39d3dd90141e0e1b78267f9ed4c02f /link/link-protocol.c | |
| parent | c72284953bb6938ff480ae9be11d5d0c3c4154f6 (diff) | |
| download | pure-d1e8f38f100571d55aaa98527ae2873e6d247f80.tar.gz pure-d1e8f38f100571d55aaa98527ae2873e6d247f80.zip | |
Let a held snapshot keep the states of its time, not all that came after
An app's snapshots formed a chain, each holding the next, and what the
app's lists let go while a snapshot was the newest went with it. So one
snapshot held for long held every later one and every node and text let
go since: a surface holding the snapshot of 20,000 items while their
notes were set again grew the node from 6.5 MB to 696 MB in 30 s, 3.4 KB
an update, without end.
A snapshot reads only what was made before it. Snapshots are now
numbered (their epoch, given to the lists' copies and so to each node
and text made after), and the ones held are linked under a register
they share. What the app lets go while a snapshot is its newest goes
with it, as before; when that one goes, what the newest older one still
held may read (made before its epoch) goes to it, and the rest back to
the system at once. The links move under a spin the register keeps; what
is freed is freed outside it. The same held snapshot now costs its
states once: 6.6 MB to 10.6 MB, flat after the notes diverge.
test-module's snapshot_held holds a snapshot through 40,000 events and
snapshots: none of the second 20,000's allocations stays (0 B; with the
chain's keeping, it fails). The kept-snapshots tests read eight held in
random order, and the module tests pass under AddressSanitizer too.
Diffstat (limited to 'link/link-protocol.c')
0 files changed, 0 insertions, 0 deletions
