mirror of
https://github.com/PabloMK7/citra.git
synced 2025-12-01 04:48:47 +00:00
kernel: Improvements to process cleanup. (#6680)
* kernel: Properly clean up process threads on exit. * kernel: Track process-owned memory and free on destruction. * apt: Implement DoApplicationJump via home menu when available. * kernel: Move TLS allocation management to owning process.
This commit is contained in:
parent
8b6b58a364
commit
9cb14044ec
11 changed files with 272 additions and 179 deletions
|
|
@ -217,6 +217,8 @@ public:
|
|||
u32 memory_used = 0;
|
||||
|
||||
std::shared_ptr<MemoryRegionInfo> memory_region = nullptr;
|
||||
MemoryRegionInfo::IntervalSet holding_memory;
|
||||
MemoryRegionInfo::IntervalSet holding_tls_memory;
|
||||
|
||||
/// The Thread Local Storage area is allocated as processes create threads,
|
||||
/// each TLS area is 0x200 bytes, so one page (0x1000) is split up in 8 parts, and each part
|
||||
|
|
@ -237,12 +239,16 @@ public:
|
|||
ResultVal<VAddr> LinearAllocate(VAddr target, u32 size, VMAPermission perms);
|
||||
ResultCode LinearFree(VAddr target, u32 size);
|
||||
|
||||
ResultVal<VAddr> AllocateThreadLocalStorage();
|
||||
|
||||
ResultCode Map(VAddr target, VAddr source, u32 size, VMAPermission perms,
|
||||
bool privileged = false);
|
||||
ResultCode Unmap(VAddr target, VAddr source, u32 size, VMAPermission perms,
|
||||
bool privileged = false);
|
||||
|
||||
private:
|
||||
void FreeAllMemory();
|
||||
|
||||
KernelSystem& kernel;
|
||||
|
||||
friend class boost::serialization::access;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue