page fault in setting up heap
Posted: Thu Dec 25, 2008 1:42 pm
Hi
I am referring JamesM tutorial. While setting up the heap i am getting a page fault as
Page fault! ( present read-only ) at 0xc0100000 - EIP: 0x1002e7
Its causing a page fault when i try to when it executes the following statement in initialise_paging()
Using the print command i found that the page fault actually occurs in function place_ordered_array when it tries to clear the memory in which to place heap->index.
I am using Bochs and gcc on Ubuntu.I have also attached my code.Any help is appreciated.
Thanks.
I am referring JamesM tutorial. While setting up the heap i am getting a page fault as
Page fault! ( present read-only ) at 0xc0100000 - EIP: 0x1002e7
Its causing a page fault when i try to when it executes the following statement in initialise_paging()
Code: Select all
kheap = create_heap(KHEAP_START, KHEAP_START+KHEAP_INITIAL_SIZE, 0xCFFFF000, 0, 0);
Code: Select all
memset(temp.array, 0, max_size*sizeof(type_t));
Thanks.