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
| 36 | // |
| 37 | // +stateify savable |
| 38 | type 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. |
| 64 | func (f *MmapPreciseFile) SetFD(fd int) { |
nothing calls this directly
no outgoing calls
no test coverage detected