| 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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 | 275 |
| 276 // Returns the activation frame alignment constraint or zero if | 276 // Returns the activation frame alignment constraint or zero if |
| 277 // the platform doesn't care. Guaranteed to be a power of two. | 277 // the platform doesn't care. Guaranteed to be a power of two. |
| 278 static int ActivationFrameAlignment(); | 278 static int ActivationFrameAlignment(); |
| 279 | 279 |
| 280 static void ReleaseStore(volatile AtomicWord* ptr, AtomicWord value); | 280 static void ReleaseStore(volatile AtomicWord* ptr, AtomicWord value); |
| 281 | 281 |
| 282 private: | 282 private: |
| 283 static const int msPerSecond = 1000; | 283 static const int msPerSecond = 1000; |
| 284 | 284 |
| 285 // The address range used to randomize RWX allocations in OS::Allocate |
| 286 // Try not to map pages into the default range that windows loads DLLs |
| 287 // Note: This does not guarantee RWX regions will be within the |
| 288 // range kAllocationRandomAddressMin to kAllocationRandomAddressMax |
| 289 #ifdef V8_HOST_ARCH_64_BIT |
| 290 static const intptr_t kAllocationRandomAddressMin = 0x0000000080000000; |
| 291 static const intptr_t kAllocationRandomAddressMax = 0x000004FFFFFFFFFF; |
| 292 #else |
| 293 static const intptr_t kAllocationRandomAddressMin = 0x04000000; |
| 294 static const intptr_t kAllocationRandomAddressMax = 0x4FFFFFFF; |
| 295 #endif |
| 296 |
| 285 DISALLOW_IMPLICIT_CONSTRUCTORS(OS); | 297 DISALLOW_IMPLICIT_CONSTRUCTORS(OS); |
| 286 }; | 298 }; |
| 287 | 299 |
| 288 | 300 |
| 289 class VirtualMemory { | 301 class VirtualMemory { |
| 290 public: | 302 public: |
| 291 // Reserves virtual memory with size. | 303 // Reserves virtual memory with size. |
| 292 explicit VirtualMemory(size_t size); | 304 explicit VirtualMemory(size_t size); |
| 293 ~VirtualMemory(); | 305 ~VirtualMemory(); |
| 294 | 306 |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 568 bool active_; | 580 bool active_; |
| 569 PlatformData* data_; // Platform specific data. | 581 PlatformData* data_; // Platform specific data. |
| 570 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); | 582 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); |
| 571 }; | 583 }; |
| 572 | 584 |
| 573 #endif // ENABLE_LOGGING_AND_PROFILING | 585 #endif // ENABLE_LOGGING_AND_PROFILING |
| 574 | 586 |
| 575 } } // namespace v8::internal | 587 } } // namespace v8::internal |
| 576 | 588 |
| 577 #endif // V8_PLATFORM_H_ | 589 #endif // V8_PLATFORM_H_ |
| OLD | NEW |