diff options
Diffstat (limited to 'base/shared_memory_android.cc')
-rw-r--r-- | base/shared_memory_android.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/base/shared_memory_android.cc b/base/shared_memory_android.cc index 72c3a56..8e55e3a 100644 --- a/base/shared_memory_android.cc +++ b/base/shared_memory_android.cc @@ -16,12 +16,13 @@ namespace base { // all the file descriptors from different processes associated with the region // are closed, the memory buffer will go away. -bool SharedMemory::CreateNamed(const std::string& name, - bool open_existing, uint32 size) { +bool SharedMemory::Create(const SharedMemoryCreateOptions& options) { DCHECK_EQ(-1, mapped_file_ ); // "name" is just a label in ashmem. It is visible in /proc/pid/maps. - mapped_file_ = ashmem_create_region(name.c_str(), size); + mapped_file_ = ashmem_create_region( + options.name == NULL ? "" : options.name.c_str(), + options.size); if (-1 == mapped_file_) { DLOG(ERROR) << "Shared memory creation failed"; return false; |