Merge pull request #6373 from bunnei/use-slabheap-tls

hle: kernel: KSlabHeap: Allow host or guest allocations.
This commit is contained in:
bunnei 2021-05-29 00:17:24 -07:00 committed by GitHub
commit 5388e6db84
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 191 additions and 11 deletions

View file

@ -620,7 +620,8 @@ struct KernelCore::Impl {
void InitializePageSlab() {
// Allocate slab heaps
user_slab_heap_pages = std::make_unique<KSlabHeap<Page>>();
user_slab_heap_pages =
std::make_unique<KSlabHeap<Page>>(KSlabHeap<Page>::AllocationType::Guest);
// TODO(ameerj): This should be derived, not hardcoded within the kernel
constexpr u64 user_slab_heap_size{0x3de000};