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

Unified Diff: base/memory/discardable_memory_shmem.cc

Issue 809603004: base: Add ashmem support to base::DiscardableSharedMemory implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix include Created 6 years 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 | « no previous file | base/memory/discardable_shared_memory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/discardable_memory_shmem.cc
diff --git a/base/memory/discardable_memory_shmem.cc b/base/memory/discardable_memory_shmem.cc
index 77699f0739f30f4725330e95d002bfd0cfeb1ef5..42824813f8452bb51462d311d932ac49cd47fc48 100644
--- a/base/memory/discardable_memory_shmem.cc
+++ b/base/memory/discardable_memory_shmem.cc
@@ -93,7 +93,7 @@ void* DiscardableMemoryShmem::Memory() const {
}
bool DiscardableMemoryShmem::AllocateAndAcquireLock() {
- if (shared_memory_ && shared_memory_->Lock())
+ if (shared_memory_ && shared_memory_->Lock(0, 0))
return true;
// TODO(reveman): Allocate fixed size memory segments and use a free list to
@@ -105,7 +105,7 @@ bool DiscardableMemoryShmem::AllocateAndAcquireLock() {
}
void DiscardableMemoryShmem::ReleaseLock() {
- shared_memory_->Unlock();
+ shared_memory_->Unlock(0, 0);
}
void DiscardableMemoryShmem::Purge() {
« no previous file with comments | « no previous file | base/memory/discardable_shared_memory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698