OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 size_t size() { return size_; } | 356 size_t size() { return size_; } |
357 | 357 |
358 // Commits real memory. Returns whether the operation succeeded. | 358 // Commits real memory. Returns whether the operation succeeded. |
359 bool Commit(void* address, size_t size, bool is_executable); | 359 bool Commit(void* address, size_t size, bool is_executable); |
360 | 360 |
361 // Uncommit real memory. Returns whether the operation succeeded. | 361 // Uncommit real memory. Returns whether the operation succeeded. |
362 bool Uncommit(void* address, size_t size); | 362 bool Uncommit(void* address, size_t size); |
363 | 363 |
364 static void* ReserveRegion(size_t size); | 364 static void* ReserveRegion(size_t size); |
365 | 365 |
| 366 static void* ReserveAlignedRegion(size_t size, size_t alignment); |
| 367 |
366 static bool CommitRegion(void* base, size_t size, bool is_executable); | 368 static bool CommitRegion(void* base, size_t size, bool is_executable); |
367 | 369 |
368 static bool UncommitRegion(void* base, size_t size); | 370 static bool UncommitRegion(void* base, size_t size); |
369 | 371 |
370 static bool ReleaseRegion(void* base, size_t size); | 372 static bool ReleaseRegion(void* base, size_t size); |
371 | 373 |
372 private: | 374 private: |
373 void* address_; // Start address of the virtual memory. | 375 void* address_; // Start address of the virtual memory. |
374 size_t size_; // Size of the virtual memory. | 376 size_t size_; // Size of the virtual memory. |
375 }; | 377 }; |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
669 Atomic32 active_; | 671 Atomic32 active_; |
670 PlatformData* data_; // Platform specific data. | 672 PlatformData* data_; // Platform specific data. |
671 int samples_taken_; // Counts stack samples taken. | 673 int samples_taken_; // Counts stack samples taken. |
672 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); | 674 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); |
673 }; | 675 }; |
674 | 676 |
675 | 677 |
676 } } // namespace v8::internal | 678 } } // namespace v8::internal |
677 | 679 |
678 #endif // V8_PLATFORM_H_ | 680 #endif // V8_PLATFORM_H_ |
OLD | NEW |