Preconditions: f.mu must be locked.
()
| 1808 | |
| 1809 | // Preconditions: f.mu must be locked. |
| 1810 | func (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. |
no test coverage detected