mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-13 14:44:23 -04:00
kern: implement KMemoryManager init
This commit is contained in:
parent
1de607c183
commit
f7d3d50f33
9 changed files with 283 additions and 9 deletions
|
@ -29,6 +29,7 @@ namespace ams::kern {
|
|||
class KInterruptManager;
|
||||
class KInterruptTaskManager;
|
||||
class KScheduler;
|
||||
class KMemoryManager;
|
||||
|
||||
class Kernel {
|
||||
public:
|
||||
|
@ -42,6 +43,7 @@ namespace ams::kern {
|
|||
static KThread s_main_threads[cpu::NumCores];
|
||||
static KThread s_idle_threads[cpu::NumCores];
|
||||
static KResourceLimit s_system_resource_limit;
|
||||
static KMemoryManager s_memory_manager;
|
||||
private:
|
||||
static ALWAYS_INLINE KCoreLocalContext &GetCoreLocalContext() {
|
||||
return reinterpret_cast<KCoreLocalRegion *>(cpu::GetCoreLocalRegionAddress())->current.context;
|
||||
|
@ -84,6 +86,10 @@ namespace ams::kern {
|
|||
return GetCoreLocalContext().hardware_timer;
|
||||
}
|
||||
|
||||
static ALWAYS_INLINE KMemoryManager &GetMemoryManager() {
|
||||
return s_memory_manager;
|
||||
}
|
||||
|
||||
static ALWAYS_INLINE KResourceLimit &GetSystemResourceLimit() {
|
||||
return s_system_resource_limit;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue