| 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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 // using --never-compact) if accurate profiling is desired. | 267 // using --never-compact) if accurate profiling is desired. |
| 268 static void SignalCodeMovingGC(); | 268 static void SignalCodeMovingGC(); |
| 269 | 269 |
| 270 // The return value indicates the CPU features we are sure of because of the | 270 // The return value indicates the CPU features we are sure of because of the |
| 271 // OS. | 271 // OS. |
| 272 // This is a little messy because the interpretation is subject to the cross | 272 // This is a little messy because the interpretation is subject to the cross |
| 273 // of the CPU and the OS. The bits in the answer correspond to the bit | 273 // of the CPU and the OS. The bits in the answer correspond to the bit |
| 274 // positions indicated by the members of the CpuFeature enum from globals.h | 274 // positions indicated by the members of the CpuFeature enum from globals.h |
| 275 static unsigned CpuFeaturesImpliedByPlatform(); | 275 static unsigned CpuFeaturesImpliedByPlatform(); |
| 276 | 276 |
| 277 // Returns the number of processors online. |
| 278 static int NumberOfProcessorsOnline(); |
| 279 |
| 277 // The total amount of physical memory available on the current system. | 280 // The total amount of physical memory available on the current system. |
| 278 static uint64_t TotalPhysicalMemory(); | 281 static uint64_t TotalPhysicalMemory(); |
| 279 | 282 |
| 280 // Maximum size of the virtual memory. 0 means there is no artificial | 283 // Maximum size of the virtual memory. 0 means there is no artificial |
| 281 // limit. | 284 // limit. |
| 282 static intptr_t MaxVirtualMemory(); | 285 static intptr_t MaxVirtualMemory(); |
| 283 | 286 |
| 284 // Returns the double constant NAN | 287 // Returns the double constant NAN |
| 285 static double nan_value(); | 288 static double nan_value(); |
| 286 | 289 |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 584 char name_[kMaxThreadNameLength]; | 587 char name_[kMaxThreadNameLength]; |
| 585 int stack_size_; | 588 int stack_size_; |
| 586 Semaphore* start_semaphore_; | 589 Semaphore* start_semaphore_; |
| 587 | 590 |
| 588 DISALLOW_COPY_AND_ASSIGN(Thread); | 591 DISALLOW_COPY_AND_ASSIGN(Thread); |
| 589 }; | 592 }; |
| 590 | 593 |
| 591 } } // namespace v8::internal | 594 } } // namespace v8::internal |
| 592 | 595 |
| 593 #endif // V8_PLATFORM_H_ | 596 #endif // V8_PLATFORM_H_ |
| OLD | NEW |