diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-02-25 21:48:45 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-02-25 21:48:45 +0000 |
commit | 252dac4e03e749ead75db6ba10b1d79603d9d1a7 (patch) | |
tree | a142c411962110bffd4ec55c0def6db6087e4287 /pkg/sentry/mm/lifecycle.go | |
parent | d2b2e5e17a8664653211e763204cc01b78b5c7a9 (diff) | |
parent | 72e3f3a3eef3a1dc02db0ff71f98a5d7fe89a6e3 (diff) |
Merge release-20200219.0-40-g72e3f3a (automated)
Diffstat (limited to 'pkg/sentry/mm/lifecycle.go')
-rw-r--r-- | pkg/sentry/mm/lifecycle.go | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/pkg/sentry/mm/lifecycle.go b/pkg/sentry/mm/lifecycle.go index 3c263ebaa..d8a5b9d29 100644 --- a/pkg/sentry/mm/lifecycle.go +++ b/pkg/sentry/mm/lifecycle.go @@ -28,16 +28,17 @@ import ( ) // NewMemoryManager returns a new MemoryManager with no mappings and 1 user. -func NewMemoryManager(p platform.Platform, mfp pgalloc.MemoryFileProvider) *MemoryManager { +func NewMemoryManager(p platform.Platform, mfp pgalloc.MemoryFileProvider, sleepForActivation bool) *MemoryManager { return &MemoryManager{ - p: p, - mfp: mfp, - haveASIO: p.SupportsAddressSpaceIO(), - privateRefs: &privateRefs{}, - users: 1, - auxv: arch.Auxv{}, - dumpability: UserDumpable, - aioManager: aioManager{contexts: make(map[uint64]*AIOContext)}, + p: p, + mfp: mfp, + haveASIO: p.SupportsAddressSpaceIO(), + privateRefs: &privateRefs{}, + users: 1, + auxv: arch.Auxv{}, + dumpability: UserDumpable, + aioManager: aioManager{contexts: make(map[uint64]*AIOContext)}, + sleepForActivation: sleepForActivation, } } @@ -79,9 +80,10 @@ func (mm *MemoryManager) Fork(ctx context.Context) (*MemoryManager, error) { envv: mm.envv, auxv: append(arch.Auxv(nil), mm.auxv...), // IncRef'd below, once we know that there isn't an error. - executable: mm.executable, - dumpability: mm.dumpability, - aioManager: aioManager{contexts: make(map[uint64]*AIOContext)}, + executable: mm.executable, + dumpability: mm.dumpability, + aioManager: aioManager{contexts: make(map[uint64]*AIOContext)}, + sleepForActivation: mm.sleepForActivation, } // Copy vmas. |