Commit ed94274a authored by Scott Graham's avatar Scott Graham Committed by Commit Bot

fuchsia: Implement base::SharedMemory::GetHandleLimit()

There's no documented handle limit on Fuchsia, and it looks like this
function is used for questionable purposes anyway, so just return
::max().

Bug: 743296
Change-Id: I4e85f31eb519d5dc2d96882d793b9e2c4afc7851
Reviewed-on: https://chromium-review.googlesource.com/597008
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491387}
parent bac0f1af
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
#include "base/memory/shared_memory.h" #include "base/memory/shared_memory.h"
#include <limits>
#include <magenta/process.h> #include <magenta/process.h>
#include <magenta/rights.h> #include <magenta/rights.h>
#include <magenta/syscalls.h> #include <magenta/syscalls.h>
...@@ -36,6 +38,12 @@ void SharedMemory::CloseHandle(const SharedMemoryHandle& handle) { ...@@ -36,6 +38,12 @@ void SharedMemory::CloseHandle(const SharedMemoryHandle& handle) {
handle.Close(); handle.Close();
} }
// static
size_t SharedMemory::GetHandleLimit() {
// No documented limit, currently.
return std::numeric_limits<size_t>::max();
}
bool SharedMemory::CreateAndMapAnonymous(size_t size) { bool SharedMemory::CreateAndMapAnonymous(size_t size) {
return CreateAnonymous(size) && Map(size); return CreateAnonymous(size) && Map(size);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment