memory management bitmap...

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
User avatar
xyjamepa
Member
Member
Posts: 397
Joined: Fri Sep 29, 2006 8:59 am

memory management bitmap...

Post by xyjamepa »

Hi...
I decided to rewrite my memory management to fix some bugs,and
I'll start from the first layer which is the physical,I already
have an Implementation of it by using a stack for allocating
and freeing memory pages but now I want to Implement it with the
bitmap,I know that each element represents one page but the problem
is how am I suppose to get the address of an allocated page?
in another way let's assume that the first five elements of the
array of bitmap were allocated I need to know how to get the addresses
of this five pages?what math should I do on the index of the array
to get the address?
Also some explain about the bitmap way would be soooooo helpful.


Thanx.
User avatar
deadmutex
Member
Member
Posts: 85
Joined: Wed Sep 28, 2005 11:00 pm

Post by deadmutex »

It's simple really.

Address = StartAddress + BitNumber * PageSize
Post Reply