Memory data structure

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Prabu

Memory data structure

Post by Prabu »

what data structure will be efficient to use to manage what
pages are allocated for a process's
data area,
bss,
and stack.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:Memory data structure

Post by Solar »

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.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Memory data structure

Post by Pype.Clicker »

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.
Post Reply