use a sliding window of in-memory writable chunks

This commit is contained in:
chrislu
2022-01-23 23:02:05 -08:00
parent 520591e6ea
commit 3bba2124ef
5 changed files with 26 additions and 3 deletions

View File

@@ -101,6 +101,10 @@ func (sc *SwapFileChunk) IsComplete() bool {
return sc.usage.IsComplete(sc.swapfile.chunkSize)
}
func (sc *SwapFileChunk) WrittenSize() int64 {
return sc.usage.WrittenSize()
}
func (sc *SwapFileChunk) SaveContent(saveFn SaveToStorageFunc) {
if saveFn == nil {
return