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

Purgeable Kernel Memory #49

Open
Andy-Python-Programmer opened this issue Feb 2, 2022 · 1 comment
Open

Purgeable Kernel Memory #49

Andy-Python-Programmer opened this issue Feb 2, 2022 · 1 comment
Labels
C-kernel Category: kernel enhancement New feature or request

Comments

@Andy-Python-Programmer
Copy link
Owner

We could have the concept of purgeable kernel memory that we can purge at any moment if we get out of memory. This way we could have a PurgeableOnce which will destroy and free its inner storage on OOM and that way we could get by using a lot less memory. Using this mechanism we could update all of the CACHES to use PurgeableOnce rather then just Once to store the inner data. This method can also be applied to userland memory mappings but we will prioritise purgeable kernel memory first since there are a lot of stuff that kernel caches and can be freed on OOM.

:^) big brain 🧠 :^)

@Andy-Python-Programmer Andy-Python-Programmer added C-kernel Category: kernel enhancement New feature or request labels Feb 2, 2022
@markusbkk
Copy link

Nice one.

SerenityOS has a proper implementation of this that is similar to macOS'.

https://www.reddit.com/r/programming/comments/e8pbmk/implementing_macosstyle_purgeable_memory_in_my/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-kernel Category: kernel enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants