summaryrefslogtreecommitdiffstats
path: root/base/sys_info_openbsd.cc
diff options
context:
space:
mode:
authorljagielski <ljagielski@opera.com>2015-04-14 06:45:42 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-14 13:46:15 +0000
commite6293f55b0e7abc73ee1925395c5f8b84a9b2e03 (patch)
tree0f7976e251bed2b51587965352ebeb23d9376eab /base/sys_info_openbsd.cc
parent62adf72afec378e8e22a8c3f549b86100ebfea2f (diff)
downloadchromium_src-e6293f55b0e7abc73ee1925395c5f8b84a9b2e03.zip
chromium_src-e6293f55b0e7abc73ee1925395c5f8b84a9b2e03.tar.gz
chromium_src-e6293f55b0e7abc73ee1925395c5f8b84a9b2e03.tar.bz2
sys_info_linux: positive return value of MaxSharedMemorySize for 32-bit build on 64-bit host.
Previous implementation caused DCHECK when value exceeded 32-bit size_t. BUG= Review URL: https://codereview.chromium.org/1000933002 Cr-Commit-Position: refs/heads/master@{#325034}
Diffstat (limited to 'base/sys_info_openbsd.cc')
-rw-r--r--base/sys_info_openbsd.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/base/sys_info_openbsd.cc b/base/sys_info_openbsd.cc
index edbb2c9..595291b 100644
--- a/base/sys_info_openbsd.cc
+++ b/base/sys_info_openbsd.cc
@@ -49,7 +49,7 @@ int64 SysInfo::AmountOfAvailablePhysicalMemory() {
}
// static
-size_t SysInfo::MaxSharedMemorySize() {
+uint64 SysInfo::MaxSharedMemorySize() {
int mib[] = { CTL_KERN, KERN_SHMINFO, KERN_SHMINFO_SHMMAX };
size_t limit;
size_t size = sizeof(limit);
@@ -57,7 +57,7 @@ size_t SysInfo::MaxSharedMemorySize() {
NOTREACHED();
return 0;
}
- return limit;
+ return static_cast<uint64>(limit);
}
// static