| Index: src/platform-openbsd.cc
|
| diff --git a/src/platform-openbsd.cc b/src/platform-openbsd.cc
|
| index 4f5420ee45c97e5ede7ee0cde34118f1aac7c947..0b6c2bce7b00fe3e233cafede45b924b87cc483c 100644
|
| --- a/src/platform-openbsd.cc
|
| +++ b/src/platform-openbsd.cc
|
| @@ -231,6 +231,16 @@ void OS::SignalCodeMovingGC() {
|
| }
|
|
|
|
|
| +uintptr_t OS::TotalPhysicalMemory(int pages_name) {
|
| + intptr_t pages = sysconf(pages_name);
|
| + intptr_t page_size = sysconf(_SC_PAGESIZE);
|
| + if (pages == -1 || page_size == -1) {
|
| + UNREACHABLE();
|
| + return 0;
|
| + }
|
| + return static_cast<uintptr_t>(pages) * page_size;
|
| +}
|
| +
|
|
|
| // Constants used for mmap.
|
| static const int kMmapFd = -1;
|
|
|