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 the size of committed memory which is currently resident | |
433 // in the physical memory for the region specified with base and size | |
434 // arguments. | |
435 // On success stores the committed physical memory size at the location | |
436 // pointed by the last argument and returns true. Returns false on failure. | |
437 static bool CommittedPhysicalSizeInRegion( | |
438 void* base, size_t size, size_t* physical); | |
439 | |
440 private: | 432 private: |
441 void* address_; // Start address of the virtual memory. | 433 void* address_; // Start address of the virtual memory. |
442 size_t size_; // Size of the virtual memory. | 434 size_t size_; // Size of the virtual memory. |
443 }; | 435 }; |
444 | 436 |
445 | 437 |
446 // ---------------------------------------------------------------------------- | 438 // ---------------------------------------------------------------------------- |
447 // Thread | 439 // Thread |
448 // | 440 // |
449 // Thread objects are used for creating and running threads. When the start() | 441 // Thread objects are used for creating and running threads. When the start() |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
789 Atomic32 active_; | 781 Atomic32 active_; |
790 PlatformData* data_; // Platform specific data. | 782 PlatformData* data_; // Platform specific data. |
791 int samples_taken_; // Counts stack samples taken. | 783 int samples_taken_; // Counts stack samples taken. |
792 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); | 784 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); |
793 }; | 785 }; |
794 | 786 |
795 | 787 |
796 } } // namespace v8::internal | 788 } } // namespace v8::internal |
797 | 789 |
798 #endif // V8_PLATFORM_H_ | 790 #endif // V8_PLATFORM_H_ |
OLD | NEW |