MCPcopy
hub / github.com/google/gvisor / MmapPreciseFile

Struct MmapPreciseFile

pkg/sentry/fsutil/mmap_precise_file.go:38–61  ·  view source on GitHub ↗

MmapPreciseFile implements MmapFile. It differs from MmapCachedFile in the following notable ways: - MmapPreciseFile does not track referenced pages in sentry memory accounting. - MmapPreciseFile creates sentry mappings of referenced pages at exact page boundaries specified in a file range. SetFD m

Source from the content-addressed store, hash-verified

36//
37// +stateify savable
38type MmapPreciseFile struct {
39 memmap.NoBufferedIOFallback
40
41 // immutable after initialization
42 fd int
43 memType hostarch.MemoryType
44 addrMustEqualFileOffset bool
45
46 refsMu refsMutex `state:"nosave"`
47
48 // +checklocks:refsMu
49 mappableReleased bool
50
51 // +checklocks:refsMu
52 refs refsSet
53
54 mapsMu mapsMutex `state:"nosave"`
55
56 // mappings is a set of internal mappings of the device. The value is a
57 // mapping object.
58 //
59 // +checklocks:mapsMu
60 mappings mappingSet
61}
62
63// SetFD implements MmapFile.SetFD.
64func (f *MmapPreciseFile) SetFD(fd int) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected