| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This module contains the platform-specific code. This make the rest of the | 5 // This module contains the platform-specific code. This make the rest of the |
| 6 // code less dependent on operating system, compilers and runtime libraries. | 6 // code less dependent on operating system, compilers and runtime libraries. |
| 7 // This module does specifically not deal with differences between different | 7 // This module does specifically not deal with differences between different |
| 8 // processor architecture. | 8 // processor architecture. |
| 9 // The platform classes have the same definition for all platforms. The | 9 // The platform classes have the same definition for all platforms. The |
| 10 // implementation for a particular platform is put in platform_<os>.cc. | 10 // implementation for a particular platform is put in platform_<os>.cc. |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 }; | 277 }; |
| 278 | 278 |
| 279 static std::vector<SharedLibraryAddress> GetSharedLibraryAddresses(); | 279 static std::vector<SharedLibraryAddress> GetSharedLibraryAddresses(); |
| 280 | 280 |
| 281 // Support for the profiler. Notifies the external profiling | 281 // Support for the profiler. Notifies the external profiling |
| 282 // process that a code moving garbage collection starts. Can do | 282 // process that a code moving garbage collection starts. Can do |
| 283 // nothing, in which case the code objects must not move (e.g., by | 283 // nothing, in which case the code objects must not move (e.g., by |
| 284 // using --never-compact) if accurate profiling is desired. | 284 // using --never-compact) if accurate profiling is desired. |
| 285 static void SignalCodeMovingGC(); | 285 static void SignalCodeMovingGC(); |
| 286 | 286 |
| 287 // Returns the number of processors online. | |
| 288 static int NumberOfProcessorsOnline(); | |
| 289 | |
| 290 // The total amount of physical memory available on the current system. | |
| 291 static uint64_t TotalPhysicalMemory(); | |
| 292 | |
| 293 // Maximum size of the virtual memory. 0 means there is no artificial | |
| 294 // limit. | |
| 295 static intptr_t MaxVirtualMemory(); | |
| 296 | |
| 297 // Returns the double constant NAN | 287 // Returns the double constant NAN |
| 298 static double nan_value(); | 288 static double nan_value(); |
| 299 | 289 |
| 300 // Support runtime detection of whether the hard float option of the | 290 // Support runtime detection of whether the hard float option of the |
| 301 // EABI is used. | 291 // EABI is used. |
| 302 static bool ArmUsingHardFloat(); | 292 static bool ArmUsingHardFloat(); |
| 303 | 293 |
| 304 // Returns the activation frame alignment constraint or zero if | 294 // Returns the activation frame alignment constraint or zero if |
| 305 // the platform doesn't care. Guaranteed to be a power of two. | 295 // the platform doesn't care. Guaranteed to be a power of two. |
| 306 static int ActivationFrameAlignment(); | 296 static int ActivationFrameAlignment(); |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 char name_[kMaxThreadNameLength]; | 507 char name_[kMaxThreadNameLength]; |
| 518 int stack_size_; | 508 int stack_size_; |
| 519 Semaphore* start_semaphore_; | 509 Semaphore* start_semaphore_; |
| 520 | 510 |
| 521 DISALLOW_COPY_AND_ASSIGN(Thread); | 511 DISALLOW_COPY_AND_ASSIGN(Thread); |
| 522 }; | 512 }; |
| 523 | 513 |
| 524 } } // namespace v8::base | 514 } } // namespace v8::base |
| 525 | 515 |
| 526 #endif // V8_BASE_PLATFORM_PLATFORM_H_ | 516 #endif // V8_BASE_PLATFORM_PLATFORM_H_ |
| OLD | NEW |