OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 explicit VirtualMemory(size_t size); | 295 explicit VirtualMemory(size_t size); |
296 ~VirtualMemory(); | 296 ~VirtualMemory(); |
297 | 297 |
298 // Returns whether the memory has been reserved. | 298 // Returns whether the memory has been reserved. |
299 bool IsReserved(); | 299 bool IsReserved(); |
300 | 300 |
301 // Returns the start address of the reserved memory. | 301 // Returns the start address of the reserved memory. |
302 void* address() { | 302 void* address() { |
303 ASSERT(IsReserved()); | 303 ASSERT(IsReserved()); |
304 return address_; | 304 return address_; |
305 }; | 305 } |
306 | 306 |
307 // Returns the size of the reserved memory. | 307 // Returns the size of the reserved memory. |
308 size_t size() { return size_; } | 308 size_t size() { return size_; } |
309 | 309 |
310 // Commits real memory. Returns whether the operation succeeded. | 310 // Commits real memory. Returns whether the operation succeeded. |
311 bool Commit(void* address, size_t size, bool is_executable); | 311 bool Commit(void* address, size_t size, bool is_executable); |
312 | 312 |
313 // Uncommit real memory. Returns whether the operation succeeded. | 313 // Uncommit real memory. Returns whether the operation succeeded. |
314 bool Uncommit(void* address, size_t size); | 314 bool Uncommit(void* address, size_t size); |
315 | 315 |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
577 bool active_; | 577 bool active_; |
578 PlatformData* data_; // Platform specific data. | 578 PlatformData* data_; // Platform specific data. |
579 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); | 579 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); |
580 }; | 580 }; |
581 | 581 |
582 #endif // ENABLE_LOGGING_AND_PROFILING | 582 #endif // ENABLE_LOGGING_AND_PROFILING |
583 | 583 |
584 } } // namespace v8::internal | 584 } } // namespace v8::internal |
585 | 585 |
586 #endif // V8_PLATFORM_H_ | 586 #endif // V8_PLATFORM_H_ |
OLD | NEW |