* @brief Releases a lockMemoryResident() pin so the lock quota is returned before the * underlying allocation is freed or recycled. */
| 649 | * underlying allocation is freed or recycled. |
| 650 | */ |
| 651 | void unlockMemoryResident(const void* ptr, size_t len) |
| 652 | { |
| 653 | Q_ASSERT(ptr != nullptr); |
| 654 | Q_ASSERT(len > 0); |
| 655 | |
| 656 | if (!ptr || len == 0) [[unlikely]] |
| 657 | return; |
| 658 | |
| 659 | #if defined(Q_OS_WIN) |
| 660 | (void)VirtualUnlock(const_cast<void*>(ptr), len); |
| 661 | #elif defined(Q_OS_LINUX) || defined(Q_OS_MACOS) |
| 662 | (void)munlock(ptr, len); |
| 663 | #else |
| 664 | Q_UNUSED(ptr); |
| 665 | Q_UNUSED(len); |
| 666 | #endif |
| 667 | } |
| 668 | |
| 669 | } // namespace AppPlatform |
| 670 |
no outgoing calls
no test coverage detected