Is this write for unalloc?
Posted: Sun Jan 22, 2006 12:00 am
I am making a unalloc for my memory manager so i needed a unset bit
so well i did this
I'm wondering if my unset bit and also my memory unallocation code is right
because according to my tests they are not[/code]
so well i did this
I'm wondering if my unset bit and also my memory unallocation code is right
because according to my tests they are not
Code: Select all
void FreeCore(void *page_ptr,unsigned int num_pages){
unsigned int index;unsigned int page=page_ptr;
page=page/4096; //convert the address to a page number
num_pages+=page;
while(num_pages<page){
index=page/32; //get what the index for pages is
pages[index]=pages[index]&(0xFFFFFFFF^(1<<(page%32))); //CHECK HERE;unset the bit
page++;
}
}