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

Method TotalSize

pkg/sentry/pgalloc/pgalloc.go:1767–1769  ·  view source on GitHub ↗

TotalSize returns the current size of the backing file in bytes, which is an upper bound on the amount of memory that can currently be allocated from the MemoryFile. The value returned by TotalSize is permitted to change.

()

Source from the content-addressed store, hash-verified

1765// upper bound on the amount of memory that can currently be allocated from the
1766// MemoryFile. The value returned by TotalSize is permitted to change.
1767func (f *MemoryFile) TotalSize() uint64 {
1768 return uint64(len(f.chunksLoad())) * chunkSize
1769}
1770
1771// File returns the backing file.
1772func (f *MemoryFile) File() *os.File {

Callers 2

SysinfoFunction · 0.80
GenerateMethod · 0.80

Calls 1

chunksLoadMethod · 0.95

Tested by

no test coverage detected