MCPcopy Index your code
hub / github.com/google/gvisor / forEachMappingSlice

Method forEachMappingSlice

pkg/sentry/pgalloc/pgalloc.go:1466–1471  ·  view source on GitHub ↗

forEachMappingSlice invokes fn on a sequence of byte slices that collectively map all bytes in fr.

(fr memmap.FileRange, fn func([]byte))

Source from the content-addressed store, hash-verified

1464// forEachMappingSlice invokes fn on a sequence of byte slices that
1465// collectively map all bytes in fr.
1466func (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.

Callers 7

SaveToMethod · 0.95
LoadFromMethod · 0.95
AllocateMethod · 0.95
manuallyZeroMethod · 0.95
MapInternalMethod · 0.95
combineMethod · 0.80
combineMethod · 0.80

Calls 2

forEachChunkMethod · 0.95
sliceAtMethod · 0.80

Tested by

no test coverage detected