Line | Source | Count |
1 | | - |
2 | namespace WTF { | - |
3 | | - |
4 | PageAllocationAligned PageAllocationAligned::allocate(size_t size, size_t alignment, OSAllocator::Usage usage, bool writable) | - |
5 | { | - |
6 | (!(isPageAligned(size)) ? (qmlWTFReportAssertionFailure(__FILE__, 33, __PRETTY_FUNCTION__, "isPageAligned(size)"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - |
7 | (!(isPageAligned(alignment)) ? (qmlWTFReportAssertionFailure(__FILE__, 34, __PRETTY_FUNCTION__, "isPageAligned(alignment)"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - |
8 | (!(isPowerOfTwo(alignment)) ? (qmlWTFReportAssertionFailure(__FILE__, 35, __PRETTY_FUNCTION__, "isPowerOfTwo(alignment)"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - |
9 | (!(size >= alignment) ? (qmlWTFReportAssertionFailure(__FILE__, 36, __PRETTY_FUNCTION__, "size >= alignment"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - |
10 | size_t alignmentMask = alignment - 1; | - |
11 | size_t alignmentDelta = alignment - pageSize(); | - |
12 | | - |
13 | | - |
14 | size_t reservationSize = size + alignmentDelta; | - |
15 | void* reservationBase = OSAllocator::reserveUncommitted(reservationSize, usage, writable); | - |
16 | | - |
17 | | - |
18 | void* alignedBase = reinterpret_cast<TRUE | never evaluated | FALSE | never evaluated |
uintptr_t>(reservationBase) & alignmentMaskTRUE | never evaluated | FALSE | never evaluated |
| 0 |
19 | ? reinterpret_cast<void*>((reinterpret_cast<uintptr_t>(reservationBase) & ~alignmentMask) + alignment) | - |
20 | : reservationBase; | - |
21 | OSAllocator::commit(alignedBase, size, writable, false); | - |
22 | | - |
23 | return never executed: return PageAllocationAligned(alignedBase, size, reservationBase, reservationSize); PageAllocationAligned(alignedBase, size, reservationBase, reservationSize);never executed: return PageAllocationAligned(alignedBase, size, reservationBase, reservationSize); | 0 |
24 | | - |
25 | } | - |
26 | | - |
27 | void PageAllocationAligned::deallocate() | - |
28 | { | - |
29 | | - |
30 | | - |
31 | PageAllocationAligned tmp; | - |
32 | std::swap(tmp, *this); | - |
33 | | - |
34 | (!(tmp) ? (qmlWTFReportAssertionFailure(__FILE__, 74, __PRETTY_FUNCTION__, "tmp"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - |
35 | (!(!*this) ? (qmlWTFReportAssertionFailure(__FILE__, 75, __PRETTY_FUNCTION__, "!*this"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - |
36 | | - |
37 | | - |
38 | | - |
39 | | - |
40 | (!(tmp.m_reservation.contains(tmp.realBase(), tmp.realSize())) ? (qmlWTFReportAssertionFailure(__FILE__, 80, __PRETTY_FUNCTION__, "tmp.m_reservation.contains(tmp.realBase(), tmp.realSize())"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - |
41 | OSAllocator::decommitAndRelease(tmp.m_reservation.realBase(), tmp.m_reservation.realSize(), | - |
42 | tmp.realBase(), tmp.realSize()); | - |
43 | | - |
44 | } never executed: end of block | 0 |
45 | | - |
46 | } | - |
| | |