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

老师您好, 关于内存章节我有疑问 #11

Open
githubzijian opened this issue Jan 11, 2025 · 1 comment
Open

老师您好, 关于内存章节我有疑问 #11

githubzijian opened this issue Jan 11, 2025 · 1 comment

Comments

@githubzijian
Copy link

关于 code/os/02-memanagement/page.c文件, 142 行的位置, page_alloc 函数的 page_i 变量,
用于标记内存是否使用的 bitmap, 为什么是从 HEAP_START 的位置开始分配而不是 heap_start_aligned 开始分配呢?

@unicornx
Copy link
Collaborator

HEAP_START_heap_start_aligned 这一段内存也是可以用的呀,为什么不用呢?参考代码中的下面这段注释

image

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

No branches or pull requests

2 participants