Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3161)

Unified Diff: base/memory/shared_memory_posix.cc

Issue 2867193004: Recode shared memory usage on Windows, macOS and NaCl (Closed)
Patch Set: Move decrementing before unmapping Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/memory/shared_memory_nacl.cc ('k') | base/memory/shared_memory_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/shared_memory_posix.cc
diff --git a/base/memory/shared_memory_posix.cc b/base/memory/shared_memory_posix.cc
index e3f333d657eb76e70d224251420e0931139747fe..b123849f27e75e9a338839294747b48e43e09a62 100644
--- a/base/memory/shared_memory_posix.cc
+++ b/base/memory/shared_memory_posix.cc
@@ -298,8 +298,8 @@ bool SharedMemory::Unmap() {
if (memory_ == NULL)
return false;
- munmap(memory_, mapped_size_);
SharedMemoryTracker::GetInstance()->DecrementMemoryUsage(*this);
+ munmap(memory_, mapped_size_);
memory_ = NULL;
mapped_size_ = 0;
return true;
« no previous file with comments | « base/memory/shared_memory_nacl.cc ('k') | base/memory/shared_memory_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698