OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This module contains the platform-specific code. This make the rest of the | 5 // This module contains the platform-specific code. This make the rest of the |
6 // code less dependent on operating system, compilers and runtime libraries. | 6 // code less dependent on operating system, compilers and runtime libraries. |
7 // This module does specifically not deal with differences between different | 7 // This module does specifically not deal with differences between different |
8 // processor architecture. | 8 // processor architecture. |
9 // The platform classes have the same definition for all platforms. The | 9 // The platform classes have the same definition for all platforms. The |
10 // implementation for a particular platform is put in platform_<os>.cc. | 10 // implementation for a particular platform is put in platform_<os>.cc. |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 VirtualMemory(); | 284 VirtualMemory(); |
285 | 285 |
286 // Reserves virtual memory with size. | 286 // Reserves virtual memory with size. |
287 explicit VirtualMemory(size_t size); | 287 explicit VirtualMemory(size_t size); |
288 | 288 |
289 // Reserves virtual memory containing an area of the given size that | 289 // Reserves virtual memory containing an area of the given size that |
290 // is aligned per alignment. This may not be at the position returned | 290 // is aligned per alignment. This may not be at the position returned |
291 // by address(). | 291 // by address(). |
292 VirtualMemory(size_t size, size_t alignment); | 292 VirtualMemory(size_t size, size_t alignment); |
293 | 293 |
| 294 // Construct a virtual memory by assigning it some already mapped address |
| 295 // and size. |
| 296 VirtualMemory(void* address, size_t size) : address_(address), size_(size) {} |
| 297 |
294 // Releases the reserved memory, if any, controlled by this VirtualMemory | 298 // Releases the reserved memory, if any, controlled by this VirtualMemory |
295 // object. | 299 // object. |
296 ~VirtualMemory(); | 300 ~VirtualMemory(); |
297 | 301 |
298 // Returns whether the memory has been reserved. | 302 // Returns whether the memory has been reserved. |
299 bool IsReserved(); | 303 bool IsReserved(); |
300 | 304 |
301 // Initialize or resets an embedded VirtualMemory object. | 305 // Initialize or resets an embedded VirtualMemory object. |
302 void Reset(); | 306 void Reset(); |
303 | 307 |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 int stack_size_; | 481 int stack_size_; |
478 Semaphore* start_semaphore_; | 482 Semaphore* start_semaphore_; |
479 | 483 |
480 DISALLOW_COPY_AND_ASSIGN(Thread); | 484 DISALLOW_COPY_AND_ASSIGN(Thread); |
481 }; | 485 }; |
482 | 486 |
483 } // namespace base | 487 } // namespace base |
484 } // namespace v8 | 488 } // namespace v8 |
485 | 489 |
486 #endif // V8_BASE_PLATFORM_PLATFORM_H_ | 490 #endif // V8_BASE_PLATFORM_PLATFORM_H_ |
OLD | NEW |