mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:57:35 +00:00
Fix VMO leak in Process::exec().
Gotta make sure things get cleaned up before we yield-teleport in exec(). Also VMOs and regions are now viewable through /proc/mm and /proc/regions.
This commit is contained in:
parent
cd1e7419f0
commit
7b96218389
4 changed files with 51 additions and 8 deletions
|
@ -146,6 +146,7 @@ class MemoryManager {
|
|||
friend class Region;
|
||||
friend class VMObject;
|
||||
friend ByteBuffer procfs$mm();
|
||||
friend ByteBuffer procfs$regions();
|
||||
public:
|
||||
static MemoryManager& the() PURE;
|
||||
|
||||
|
@ -181,6 +182,8 @@ private:
|
|||
|
||||
void register_vmo(VMObject&);
|
||||
void unregister_vmo(VMObject&);
|
||||
void register_region(Region&);
|
||||
void unregister_region(Region&);
|
||||
|
||||
LinearAddress allocate_linear_address_range(size_t);
|
||||
void map_region_at_address(PageDirectory*, Region&, LinearAddress, bool user_accessible);
|
||||
|
@ -296,6 +299,7 @@ private:
|
|||
Vector<RetainPtr<PhysicalPage>> m_free_physical_pages;
|
||||
|
||||
HashTable<VMObject*> m_vmos;
|
||||
HashTable<Region*> m_regions;
|
||||
};
|
||||
|
||||
struct KernelPagingScope {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue