mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-13 22:54:24 -04:00
kern: move SecureAppletMemory/KPageBuffer heap into the ResourceRegion
This commit is contained in:
parent
ea82889e6c
commit
5a918f3bc9
21 changed files with 282 additions and 100 deletions
|
@ -46,7 +46,7 @@ namespace ams::kern {
|
|||
MESOSPHERE_R_ABORT_UNLESS(Kernel::GetKernelPageTable().UnmapPages(stack_bottom, 1, KMemoryState_Kernel));
|
||||
|
||||
/* Free the stack page. */
|
||||
KPageBuffer::Free(KPageBuffer::FromPhysicalAddress(stack_paddr));
|
||||
KPageBuffer::FreeChecked<PageSize>(KPageBuffer::FromPhysicalAddress(stack_paddr));
|
||||
}
|
||||
|
||||
class ThreadQueueImplForKThreadSleep final : public KThreadQueueWithoutEndWait { /* ... */ };
|
||||
|
@ -334,7 +334,7 @@ namespace ams::kern {
|
|||
MESOSPHERE_ABORT_UNLESS(stack_region.GetEndAddress() != 0);
|
||||
|
||||
/* Allocate a page to use as the thread. */
|
||||
KPageBuffer *page = KPageBuffer::Allocate();
|
||||
KPageBuffer *page = KPageBuffer::AllocateChecked<PageSize>();
|
||||
R_UNLESS(page != nullptr, svc::ResultOutOfResource());
|
||||
|
||||
/* Map the stack page. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue