OLD | NEW |
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 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 static void* ReserveRegion(size_t size); | 422 static void* ReserveRegion(size_t size); |
423 | 423 |
424 static bool CommitRegion(void* base, size_t size, bool is_executable); | 424 static bool CommitRegion(void* base, size_t size, bool is_executable); |
425 | 425 |
426 static bool UncommitRegion(void* base, size_t size); | 426 static bool UncommitRegion(void* base, size_t size); |
427 | 427 |
428 // Must be called with a base pointer that has been returned by ReserveRegion | 428 // Must be called with a base pointer that has been returned by ReserveRegion |
429 // and the same size it was reserved with. | 429 // and the same size it was reserved with. |
430 static bool ReleaseRegion(void* base, size_t size); | 430 static bool ReleaseRegion(void* base, size_t size); |
431 | 431 |
| 432 // Returns true if OS performs lazy commits, i.e. the memory allocation call |
| 433 // defers actual physical memory allocation till the first memory access. |
| 434 // Otherwise returns false. |
| 435 static bool HasLazyCommits(); |
| 436 |
432 private: | 437 private: |
433 void* address_; // Start address of the virtual memory. | 438 void* address_; // Start address of the virtual memory. |
434 size_t size_; // Size of the virtual memory. | 439 size_t size_; // Size of the virtual memory. |
435 }; | 440 }; |
436 | 441 |
437 | 442 |
438 // ---------------------------------------------------------------------------- | 443 // ---------------------------------------------------------------------------- |
439 // Thread | 444 // Thread |
440 // | 445 // |
441 // Thread objects are used for creating and running threads. When the start() | 446 // Thread objects are used for creating and running threads. When the start() |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
784 Atomic32 active_; | 789 Atomic32 active_; |
785 PlatformData* data_; // Platform specific data. | 790 PlatformData* data_; // Platform specific data. |
786 int samples_taken_; // Counts stack samples taken. | 791 int samples_taken_; // Counts stack samples taken. |
787 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); | 792 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); |
788 }; | 793 }; |
789 | 794 |
790 | 795 |
791 } } // namespace v8::internal | 796 } } // namespace v8::internal |
792 | 797 |
793 #endif // V8_PLATFORM_H_ | 798 #endif // V8_PLATFORM_H_ |
OLD | NEW |