| 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 |
| 432 private: | 440 private: |
| 433 void* address_; // Start address of the virtual memory. | 441 void* address_; // Start address of the virtual memory. |
| 434 size_t size_; // Size of the virtual memory. | 442 size_t size_; // Size of the virtual memory. |
| 435 }; | 443 }; |
| 436 | 444 |
| 437 | 445 |
| 438 // ---------------------------------------------------------------------------- | 446 // ---------------------------------------------------------------------------- |
| 439 // Thread | 447 // Thread |
| 440 // | 448 // |
| 441 // Thread objects are used for creating and running threads. When the start() | 449 // 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... |
| 781 Atomic32 active_; | 789 Atomic32 active_; |
| 782 PlatformData* data_; // Platform specific data. | 790 PlatformData* data_; // Platform specific data. |
| 783 int samples_taken_; // Counts stack samples taken. | 791 int samples_taken_; // Counts stack samples taken. |
| 784 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); | 792 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); |
| 785 }; | 793 }; |
| 786 | 794 |
| 787 | 795 |
| 788 } } // namespace v8::internal | 796 } } // namespace v8::internal |
| 789 | 797 |
| 790 #endif // V8_PLATFORM_H_ | 798 #endif // V8_PLATFORM_H_ |
| OLD | NEW |