| Index: src/base/platform/platform-posix.cc
|
| diff --git a/src/base/platform/platform-posix.cc b/src/base/platform/platform-posix.cc
|
| index 252d213755299756dfec51a8a47fe7f48130b1a5..ee5b72ef94ecf7ac917e83ea9231f13cb58358c5 100644
|
| --- a/src/base/platform/platform-posix.cc
|
| +++ b/src/base/platform/platform-posix.cc
|
| @@ -70,77 +70,6 @@ const char* g_gc_fake_mmap = NULL;
|
| } // namespace
|
|
|
|
|
| -int OS::NumberOfProcessorsOnline() {
|
| - return static_cast<int>(sysconf(_SC_NPROCESSORS_ONLN));
|
| -}
|
| -
|
| -
|
| -// Maximum size of the virtual memory. 0 means there is no artificial
|
| -// limit.
|
| -
|
| -intptr_t OS::MaxVirtualMemory() {
|
| - struct rlimit limit;
|
| - int result = getrlimit(RLIMIT_DATA, &limit);
|
| - if (result != 0) return 0;
|
| -#if V8_OS_NACL
|
| - // The NaCl compiler doesn't like resource.h constants.
|
| - if (static_cast<int>(limit.rlim_cur) == -1) return 0;
|
| -#else
|
| - if (limit.rlim_cur == RLIM_INFINITY) return 0;
|
| -#endif
|
| - return limit.rlim_cur;
|
| -}
|
| -
|
| -
|
| -uint64_t OS::TotalPhysicalMemory() {
|
| -#if V8_OS_MACOSX
|
| - int mib[2];
|
| - mib[0] = CTL_HW;
|
| - mib[1] = HW_MEMSIZE;
|
| - int64_t size = 0;
|
| - size_t len = sizeof(size);
|
| - if (sysctl(mib, 2, &size, &len, NULL, 0) != 0) {
|
| - UNREACHABLE();
|
| - return 0;
|
| - }
|
| - return static_cast<uint64_t>(size);
|
| -#elif V8_OS_FREEBSD
|
| - int pages, page_size;
|
| - size_t size = sizeof(pages);
|
| - sysctlbyname("vm.stats.vm.v_page_count", &pages, &size, NULL, 0);
|
| - sysctlbyname("vm.stats.vm.v_page_size", &page_size, &size, NULL, 0);
|
| - if (pages == -1 || page_size == -1) {
|
| - UNREACHABLE();
|
| - return 0;
|
| - }
|
| - return static_cast<uint64_t>(pages) * page_size;
|
| -#elif V8_OS_CYGWIN
|
| - MEMORYSTATUS memory_info;
|
| - memory_info.dwLength = sizeof(memory_info);
|
| - if (!GlobalMemoryStatus(&memory_info)) {
|
| - UNREACHABLE();
|
| - return 0;
|
| - }
|
| - return static_cast<uint64_t>(memory_info.dwTotalPhys);
|
| -#elif V8_OS_QNX
|
| - struct stat stat_buf;
|
| - if (stat("/proc", &stat_buf) != 0) {
|
| - UNREACHABLE();
|
| - return 0;
|
| - }
|
| - return static_cast<uint64_t>(stat_buf.st_size);
|
| -#else
|
| - intptr_t pages = sysconf(_SC_PHYS_PAGES);
|
| - intptr_t page_size = sysconf(_SC_PAGESIZE);
|
| - if (pages == -1 || page_size == -1) {
|
| - UNREACHABLE();
|
| - return 0;
|
| - }
|
| - return static_cast<uint64_t>(pages) * page_size;
|
| -#endif
|
| -}
|
| -
|
| -
|
| int OS::ActivationFrameAlignment() {
|
| #if V8_TARGET_ARCH_ARM
|
| // On EABI ARM targets this is required for fp correctness in the
|
|
|