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

memwatcher:添加直接回收的监控指定进程和测试程序 #911

Merged
merged 11 commits into from
Sep 23, 2024

Conversation

syxl-time
Copy link
Contributor

github
内核之所以要进行内存回收,主要原因有两个:

  1. 内核需要为任何时刻突发到来的内存申请提供足够的内存,以便cache的使用和其他相关内存的使用不至于让系统的剩余内存长期处于很少的状态。
  2. 当真的有大于空闲内存的申请到来的时候,会触发强制内存回收。
    针对第二种,Linux系统会触发直接内存回收,在内核调用页分配函数分配物理页面时,由于系统内存短缺,不能满足分配请求,内核就会直接触发页面回收机制,尝试回收内存来解决问题。

@chenamy2017 chenamy2017 merged commit 7c78092 into linuxkerneltravel:develop Sep 23, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants