forEachMappingSlice invokes fn on a sequence of byte slices that collectively map all bytes in fr.
(fr memmap.FileRange, fn func([]byte))
| 1464 | // forEachMappingSlice invokes fn on a sequence of byte slices that |
| 1465 | // collectively map all bytes in fr. |
| 1466 | func (f *MemoryFile) forEachMappingSlice(fr memmap.FileRange, fn func([]byte)) { |
| 1467 | f.forEachChunk(fr, func(chunk *chunkInfo, chunkFR memmap.FileRange) bool { |
| 1468 | fn(chunk.sliceAt(chunkFR)) |
| 1469 | return true |
| 1470 | }) |
| 1471 | } |
| 1472 | |
| 1473 | // MarkEvictable allows f to request memory deallocation by calling |
| 1474 | // user.Evict(er) in the future. |
no test coverage detected