OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1478 | 1478 |
1479 int OS::ActivationFrameAlignment() { | 1479 int OS::ActivationFrameAlignment() { |
1480 #ifdef _WIN64 | 1480 #ifdef _WIN64 |
1481 return 16; // Windows 64-bit ABI requires the stack to be 16-byte aligned. | 1481 return 16; // Windows 64-bit ABI requires the stack to be 16-byte aligned. |
1482 #else | 1482 #else |
1483 return 8; // Floating-point math runs faster with 8-byte alignment. | 1483 return 8; // Floating-point math runs faster with 8-byte alignment. |
1484 #endif | 1484 #endif |
1485 } | 1485 } |
1486 | 1486 |
1487 | 1487 |
1488 void OS::ReleaseStore(volatile AtomicWord* ptr, AtomicWord value) { | |
1489 MemoryBarrier(); | |
1490 *ptr = value; | |
1491 } | |
1492 | |
1493 | |
1494 VirtualMemory::VirtualMemory() : address_(NULL), size_(0) { } | 1488 VirtualMemory::VirtualMemory() : address_(NULL), size_(0) { } |
1495 | 1489 |
1496 | 1490 |
1497 VirtualMemory::VirtualMemory(size_t size) | 1491 VirtualMemory::VirtualMemory(size_t size) |
1498 : address_(ReserveRegion(size)), size_(size) { } | 1492 : address_(ReserveRegion(size)), size_(size) { } |
1499 | 1493 |
1500 | 1494 |
1501 VirtualMemory::VirtualMemory(size_t size, size_t alignment) | 1495 VirtualMemory::VirtualMemory(size_t size, size_t alignment) |
1502 : address_(NULL), size_(0) { | 1496 : address_(NULL), size_(0) { |
1503 ASSERT(IsAligned(alignment, static_cast<intptr_t>(OS::AllocateAlignment()))); | 1497 ASSERT(IsAligned(alignment, static_cast<intptr_t>(OS::AllocateAlignment()))); |
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1987 limit_mutex = CreateMutex(); | 1981 limit_mutex = CreateMutex(); |
1988 } | 1982 } |
1989 | 1983 |
1990 | 1984 |
1991 void OS::TearDown() { | 1985 void OS::TearDown() { |
1992 delete limit_mutex; | 1986 delete limit_mutex; |
1993 } | 1987 } |
1994 | 1988 |
1995 | 1989 |
1996 } } // namespace v8::internal | 1990 } } // namespace v8::internal |
OLD | NEW |