rocr: Set signal memory allocations to NonPaged (#1219)

Set memory allocation to non-paged to avoid issues caused when CP tries
to access signals after page has been migrated.
This commit is contained in:
David Yat Sin
2025-10-10 17:35:15 -04:00
committed by GitHub
parent 082e7adb81
commit 7f79d0febc
@@ -79,11 +79,11 @@ SharedSignal* SharedSignalPool_t::alloc() {
ScopedAcquire<HybridMutex> lock(&lock_);
if (free_list_.empty()) {
SharedSignal* block = reinterpret_cast<SharedSignal*>(
allocate_()(block_size_ * sizeof(SharedSignal), __alignof(SharedSignal), 0, 0));
allocate_()(block_size_ * sizeof(SharedSignal), __alignof(SharedSignal), core::MemoryRegion::AllocateNonPaged, 0));
if (block == nullptr) {
block_size_ = minblock_;
block = reinterpret_cast<SharedSignal*>(
allocate_()(block_size_ * sizeof(SharedSignal), __alignof(SharedSignal), 0, 0));
allocate_()(block_size_ * sizeof(SharedSignal), __alignof(SharedSignal), core::MemoryRegion::AllocateNonPaged, 0));
if (block == nullptr) throw std::bad_alloc();
}