| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/3rdparty/masm/wtf/PageReservation.h | 
| Switch to Source code | Preprocessed file | 
| Line | Source | Count | 
|---|---|---|
| 1 | - | |
| 2 | namespace WTF { | - | 
| 3 | class PageReservation : private PageBlock { | - | 
| 4 | public: | - | 
| 5 | PageReservation() | - | 
| 6 | : m_committed(0) | - | 
| 7 | , m_writable(false) | - | 
| 8 | , m_executable(false) | - | 
| 9 | { | - | 
| 10 | } executed 297753 times by 153 tests:  end of blockExecuted by: 
 | 297753 | 
| 11 | - | |
| 12 | using PageBlock::base; | - | 
| 13 | using PageBlock::size; | - | 
| 14 | - | |
| 15 | - | |
| 16 | using PageBlock::operator bool; | - | 
| 17 | - | |
| 18 | - | |
| 19 | - | |
| 20 | - | |
| 21 | - | |
| 22 | - | |
| 23 | void commit(void* start, size_t size) | - | 
| 24 | { | - | 
| 25 | (!(*this) ? (qmlWTFReportAssertionFailure(__FILE__, 79, __PRETTY_FUNCTION__, "*this"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | 
| 26 | (!(isPageAligned(start)) ? (qmlWTFReportAssertionFailure(__FILE__, 80, __PRETTY_FUNCTION__, "isPageAligned(start)"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | 
| 27 | (!(isPageAligned(size)) ? (qmlWTFReportAssertionFailure(__FILE__, 81, __PRETTY_FUNCTION__, "isPageAligned(size)"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | 
| 28 | (!(contains(start, size)) ? (qmlWTFReportAssertionFailure(__FILE__, 82, __PRETTY_FUNCTION__, "contains(start, size)"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | 
| 29 | - | |
| 30 | m_committed += size; | - | 
| 31 | OSAllocator::commit(start, size, m_writable, m_executable); | - | 
| 32 | } executed 499045 times by 153 tests:  end of blockExecuted by: 
 | 499045 | 
| 33 | - | |
| 34 | void decommit(void* start, size_t size) | - | 
| 35 | { | - | 
| 36 | (!(*this) ? (qmlWTFReportAssertionFailure(__FILE__, 90, __PRETTY_FUNCTION__, "*this"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | 
| 37 | (!(isPageAligned(start)) ? (qmlWTFReportAssertionFailure(__FILE__, 91, __PRETTY_FUNCTION__, "isPageAligned(start)"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | 
| 38 | (!(isPageAligned(size)) ? (qmlWTFReportAssertionFailure(__FILE__, 92, __PRETTY_FUNCTION__, "isPageAligned(size)"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | 
| 39 | (!(contains(start, size)) ? (qmlWTFReportAssertionFailure(__FILE__, 93, __PRETTY_FUNCTION__, "contains(start, size)"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | 
| 40 | - | |
| 41 | m_committed -= size; | - | 
| 42 | OSAllocator::decommit(start, size); | - | 
| 43 | } executed 498945 times by 153 tests:  end of blockExecuted by: 
 | 498945 | 
| 44 | - | |
| 45 | size_t committed() | - | 
| 46 | { | - | 
| 47 | return never executed: m_committed; return m_committed;never executed:  return m_committed; | 0 | 
| 48 | } | - | 
| 49 | - | |
| 50 | static PageReservation reserve(size_t size, OSAllocator::Usage usage = OSAllocator::UnknownUsage, bool writable = true, bool executable = false) | - | 
| 51 | { | - | 
| 52 | (!(isPageAligned(size)) ? (qmlWTFReportAssertionFailure(__FILE__, 106, __PRETTY_FUNCTION__, "isPageAligned(size)"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | 
| 53 | return executed 99213 times by 153 tests: PageReservation(OSAllocator::reserveUncommitted(size, usage, writable, executable), size, writable, executable); return PageReservation(OSAllocator::reserveUncommitted(size, usage, writable, executable), size, writable, executable);Executed by: 
 executed 99213 times by 153 tests:  return PageReservation(OSAllocator::reserveUncommitted(size, usage, writable, executable), size, writable, executable);Executed by: 
 | 99213 | 
| 54 | } | - | 
| 55 | - | |
| 56 | void deallocate() | - | 
| 57 | { | - | 
| 58 | (!(!m_committed) ? (qmlWTFReportAssertionFailure(__FILE__, 112, __PRETTY_FUNCTION__, "!m_committed"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | 
| 59 | - | |
| 60 | - | |
| 61 | - | |
| 62 | PageReservation tmp; | - | 
| 63 | std::swap(tmp, *this); | - | 
| 64 | - | |
| 65 | (!(tmp) ? (qmlWTFReportAssertionFailure(__FILE__, 119, __PRETTY_FUNCTION__, "tmp"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | 
| 66 | (!(!*this) ? (qmlWTFReportAssertionFailure(__FILE__, 120, __PRETTY_FUNCTION__, "!*this"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | 
| 67 | - | |
| 68 | OSAllocator::releaseDecommitted(tmp.realBase(), tmp.realSize()); | - | 
| 69 | } executed 99255 times by 153 tests:  end of blockExecuted by: 
 | 99255 | 
| 70 | - | |
| 71 | private: | - | 
| 72 | PageReservation(void* base, size_t size, bool writable, bool executable) | - | 
| 73 | : PageBlock(base, size, false) | - | 
| 74 | , m_committed(0) | - | 
| 75 | , m_writable(writable) | - | 
| 76 | , m_executable(executable) | - | 
| 77 | { | - | 
| 78 | } executed 99267 times by 153 tests:  end of blockExecuted by: 
 | 99267 | 
| 79 | - | |
| 80 | size_t m_committed; | - | 
| 81 | bool m_writable; | - | 
| 82 | bool m_executable; | - | 
| 83 | }; | - | 
| 84 | - | |
| 85 | } | - | 
| 86 | - | |
| 87 | using WTF::PageReservation; | - | 
| Switch to Source code | Preprocessed file |