Check for empty applicationAddrRange in MM.DecUsers.
PiperOrigin-RevId: 202043776 Change-Id: I4373abbcf735dc1cf4bebbbbb0c7124df36e9e78
This commit is contained in:
parent
4ac79312b0
commit
16882484f9
|
@ -214,5 +214,9 @@ func (mm *MemoryManager) DecUsers(ctx context.Context) {
|
|||
|
||||
mm.mappingMu.Lock()
|
||||
defer mm.mappingMu.Unlock()
|
||||
mm.unmapLocked(ctx, mm.applicationAddrRange())
|
||||
// If mm is being dropped before mm.SetMmapLayout was called,
|
||||
// mm.applicationAddrRange() will be empty.
|
||||
if ar := mm.applicationAddrRange(); ar.Length() != 0 {
|
||||
mm.unmapLocked(ctx, ar)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue