| 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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 | 289 |
| 290 // Returns the size of the reserved memory. | 290 // Returns the size of the reserved memory. |
| 291 size_t size() { return size_; } | 291 size_t size() { return size_; } |
| 292 | 292 |
| 293 // Commits real memory. Returns whether the operation succeeded. | 293 // Commits real memory. Returns whether the operation succeeded. |
| 294 bool Commit(void* address, size_t size, bool is_executable); | 294 bool Commit(void* address, size_t size, bool is_executable); |
| 295 | 295 |
| 296 // Uncommit real memory. Returns whether the operation succeeded. | 296 // Uncommit real memory. Returns whether the operation succeeded. |
| 297 bool Uncommit(void* address, size_t size); | 297 bool Uncommit(void* address, size_t size); |
| 298 | 298 |
| 299 // Give OS a hint that data of that span could be just discarded |
| 300 // (no need to page it out). Might be implemented as noop. |
| 301 bool Reset(void* address, size_t size, bool is_executable); |
| 302 |
| 299 private: | 303 private: |
| 300 void* address_; // Start address of the virtual memory. | 304 void* address_; // Start address of the virtual memory. |
| 301 size_t size_; // Size of the virtual memory. | 305 size_t size_; // Size of the virtual memory. |
| 302 }; | 306 }; |
| 303 | 307 |
| 304 | 308 |
| 305 // ---------------------------------------------------------------------------- | 309 // ---------------------------------------------------------------------------- |
| 306 // ThreadHandle | 310 // ThreadHandle |
| 307 // | 311 // |
| 308 // A ThreadHandle represents a thread identifier for a thread. The ThreadHandle | 312 // A ThreadHandle represents a thread identifier for a thread. The ThreadHandle |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 547 bool active_; | 551 bool active_; |
| 548 PlatformData* data_; // Platform specific data. | 552 PlatformData* data_; // Platform specific data. |
| 549 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); | 553 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); |
| 550 }; | 554 }; |
| 551 | 555 |
| 552 #endif // ENABLE_LOGGING_AND_PROFILING | 556 #endif // ENABLE_LOGGING_AND_PROFILING |
| 553 | 557 |
| 554 } } // namespace v8::internal | 558 } } // namespace v8::internal |
| 555 | 559 |
| 556 #endif // V8_PLATFORM_H_ | 560 #endif // V8_PLATFORM_H_ |
| OLD | NEW |