summaryrefslogtreecommitdiff
path: root/src/readfile.h
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2021-08-27 19:22:51 -0700
committerVito Caputo <vcaputo@pengaru.com>2021-08-27 21:35:05 -0700
commite7d4b13994b5255eaef0135905b017ba357370c1 (patch)
treec58985faadbea38949b6d5d8267ef86fd93c3322 /src/readfile.h
parent02aa67ba96680f278158385762c7d5a7964f179f (diff)
journals: implement rudimentary read buffers
This adds eight 8KiB "fixed" buffers per opened journal, recycled in a basic LRU fashion. Any read 8KiB or smaller passes through this cache, simply memcpy()d from the buffer when already resident, or upsized to an 8KiB read when absent, to then be memcpy()d out of the populated buffer when the read into the buffer completes. Any read larger than 8KiB bypasses the buffers to be read directly into the provided destination via iou as if the cache weren't present at all.
Diffstat (limited to 'src/readfile.h')
0 files changed, 0 insertions, 0 deletions
© All Rights Reserved