Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

paging - free tables #313

Closed
Orycterope opened this issue Jun 7, 2019 · 1 comment
Closed

paging - free tables #313

Orycterope opened this issue Jun 7, 2019 · 1 comment
Assignees
Labels
good first issue Good for newcomers project-kernel Related to the kernel type-bug Something isn't working

Comments

@Orycterope
Copy link
Member

Dropping a ProcessMemory should:

  1. Free all pages in UserLand. This happens automatically when the bookkeeping is dropped, by dropping the PhysMemRegions it holds.
  2. Free all tables that map UserLand pages, but not the tables that map KernelLand pages.
  3. Free the directory page.

We ... *cough* forgot point 2 and 3 .... We should fix it presto.

@Orycterope Orycterope self-assigned this Jun 7, 2019
@Orycterope Orycterope added type-bug Something isn't working good first issue Good for newcomers project-kernel Related to the kernel labels Jun 7, 2019
@Orycterope
Copy link
Member Author

depends on #314 , otherwise will crash when we drop the init process

Orycterope added a commit to Orycterope/SunriseOS that referenced this issue Jun 8, 2019
Fixes sunriseos#313, see ticket for context.

Removed the `destroy()` function of InactiveHierarchyTrait,
as it was never called, and also invalid (used to free the KernelLand tables,
which it shouldn't)

Now the arch implementation of paging is in charge of freeing the tables,
and any additional memory relative to the hierarchy (none for x86).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers project-kernel Related to the kernel type-bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant