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

Side by Side Diff: src/platform-solaris.cc

Issue 24269003: Add methods to enable configuration of ResourceConstraints based on limits derived at runtime. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Move device-specific defaults into ConfigureResourceConstraintsForCurrentPlatform 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 166
167 167
168 void OS::LogSharedLibraryAddresses(Isolate* isolate) { 168 void OS::LogSharedLibraryAddresses(Isolate* isolate) {
169 } 169 }
170 170
171 171
172 void OS::SignalCodeMovingGC() { 172 void OS::SignalCodeMovingGC() {
173 } 173 }
174 174
175 175
176 uintptr_t OS::TotalPhysicalMemory() {
177 intptr_t pages = sysconf(_SC_PHYS_PAGES);
178 intptr_t page_size = sysconf(_SC_PAGESIZE);
179 if (pages == -1 || page_size == -1) {
180 UNREACHABLE();
181 return 0;
182 }
183 return static_cast<uintptr_t>(pages) * page_size;
184 }
185
186
176 struct StackWalker { 187 struct StackWalker {
177 Vector<OS::StackFrame>& frames; 188 Vector<OS::StackFrame>& frames;
178 int index; 189 int index;
179 }; 190 };
180 191
181 192
182 static int StackWalkCallback(uintptr_t pc, int signo, void* data) { 193 static int StackWalkCallback(uintptr_t pc, int signo, void* data) {
183 struct StackWalker* walker = static_cast<struct StackWalker*>(data); 194 struct StackWalker* walker = static_cast<struct StackWalker*>(data);
184 Dl_info info; 195 Dl_info info;
185 196
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 return munmap(base, size) == 0; 352 return munmap(base, size) == 0;
342 } 353 }
343 354
344 355
345 bool VirtualMemory::HasLazyCommits() { 356 bool VirtualMemory::HasLazyCommits() {
346 // TODO(alph): implement for the platform. 357 // TODO(alph): implement for the platform.
347 return false; 358 return false;
348 } 359 }
349 360
350 } } // namespace v8::internal 361 } } // namespace v8::internal
OLDNEW
« src/heap.cc ('K') | « src/platform-openbsd.cc ('k') | src/platform-win32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698