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

Method decommitOrManuallyZero

pkg/sentry/pgalloc/pgalloc.go:1134–1141  ·  view source on GitHub ↗
(fr memmap.FileRange)

Source from the content-addressed store, hash-verified

1132}
1133
1134func (f *MemoryFile) decommitOrManuallyZero(fr memmap.FileRange) {
1135 if err := f.decommitFile(fr); err != nil {
1136 log.Warningf("Failed to decommit %v: %v", fr, err)
1137 // Zero the pages manually. This won't reduce memory usage, but at
1138 // least ensures that the pages will be zeroed when reallocated.
1139 f.manuallyZero(fr)
1140 }
1141}
1142
1143// HasUniqueRef returns true if all pages in the given range have exactly one
1144// reference. A return value of false is inherently racy, but if the caller

Callers 2

DecommitMethod · 0.95
releaseLockedMethod · 0.95

Calls 3

decommitFileMethod · 0.95
manuallyZeroMethod · 0.95
WarningfFunction · 0.92

Tested by

no test coverage detected