Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(957)

Unified Diff: src/platform-posix.cc

Issue 24996003: Revert "Add methods to enable configuration of ResourceConstraints based on limits derived at runti… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/platform.h ('k') | src/platform-win32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform-posix.cc
diff --git a/src/platform-posix.cc b/src/platform-posix.cc
index 797557d76f830cde51cb37943edce6f5d6f3504b..df15ee2e5b5ec6580431e38c0d5e6d5d53aa2590 100644
--- a/src/platform-posix.cc
+++ b/src/platform-posix.cc
@@ -100,48 +100,6 @@ intptr_t OS::MaxVirtualMemory() {
}
-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);
-#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
« no previous file with comments | « src/platform.h ('k') | src/platform-win32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698