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

Method stringLocked

pkg/sentry/pgalloc/pgalloc.go:1810–1826  ·  view source on GitHub ↗

Preconditions: f.mu must be locked.

()

Source from the content-addressed store, hash-verified

1808
1809// Preconditions: f.mu must be locked.
1810func (f *MemoryFile) stringLocked() string {
1811 var b strings.Builder
1812 fmt.Fprintf(&b, "unwasteSmall:\n%s", &f.unwasteSmall)
1813 if f.opts.ExpectHugepages {
1814 fmt.Fprintf(&b, "unwasteHuge:\n%s", &f.unwasteHuge)
1815 }
1816 fmt.Fprintf(&b, "unfreeSmall:\n%s", &f.unfreeSmall)
1817 if f.opts.ExpectHugepages {
1818 fmt.Fprintf(&b, "unfreeHuge:\n%s", &f.unfreeHuge)
1819 fmt.Fprintf(&b, "subreleased:\n")
1820 for off, pgs := range f.subreleased {
1821 fmt.Fprintf(&b, "- %#x: %d\n", off, pgs)
1822 }
1823 }
1824 fmt.Fprintf(&b, "memAcct:\n%s", &f.memAcct)
1825 return b.String()
1826}
1827
1828// StartEvictions requests that f evict all evictable allocations. It does not
1829// wait for eviction to complete; for this, see MemoryFile.WaitForEvictions.

Callers 3

releaseLockedMethod · 0.95
StringMethod · 0.95

Calls 1

StringMethod · 0.95

Tested by

no test coverage detected