what data structure will be efficient to use to manage what
pages are allocated for a process's
data area,
bss,
and stack.
Memory data structure
Re:Memory data structure
Hmm... I'd go for a struct of some kind. Perhaps this link might help...
Every good solution is obvious once you've found it.
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Memory data structure
most of the time, the process keeps track of what *areas* are defined (like 08000000 -- 0B000000 is heap, 0B0000004 -- 0BFFFFFF is stack, etc) in an AVL tree
Then if you need to know what pages are used, you check the page directories within those ranges.
Then if you need to know what pages are used, you check the page directories within those ranges.