Page 1 of 1

Error paging when kmalloc function is called

Posted: Tue Jul 10, 2012 2:17 pm
by AlexanderSilvaB
Hi, I'm using the file heap.c (http://code.google.com/p/jamesm-tutoria ... ce/browse/ # svn 2Fthe_heap% 2Fbranches% 2Fsrc%) of JamesM, but sometimes I call the function kmalloc error occurs paging. In another tutorial (http://www.jamesmolloy.co.uk/tutorial_html/7.-The 20Heap.html%), the same error does not happen. I'm finding it strange because not always the error occurs. Please can someone help me. Thank you.

Re: Error paging when kmalloc function is called

Posted: Tue Jul 10, 2012 3:21 pm
by gerryg400
I'm finding it strange because not always the error occurs. Please can someone help me. Thank you.
It's quite normal for memory allocation problems to seem intermittent. If there are bugs in your memory management they may depend on the usage pattern. There is nothing special here, the answer is to debug.

Re: Error paging when kmalloc function is called

Posted: Tue Jul 10, 2012 4:22 pm
by JamesM
AlexanderSilvaB wrote:Hi, I'm using the file heap.c (http://code.google.com/p/jamesm-tutoria ... ce/browse/ # svn 2Fthe_heap% 2Fbranches% 2Fsrc%) of JamesM, but sometimes I call the function kmalloc error occurs paging. In another tutorial (http://www.jamesmolloy.co.uk/tutorial_html/7.-The 20Heap.html%), the same error does not happen. I'm finding it strange because not always the error occurs. Please can someone help me. Thank you.
Try debugging it. It's a lost art.

Re: Error paging when kmalloc function is called

Posted: Tue Jul 10, 2012 7:43 pm
by AlexanderSilvaB
Here is my debug logs on Bochs (
bochsout.txt
Debug Log on Bochs
(12.67 KiB) Downloaded 80 times
) and VirtualBox (
lmx.log.txt
Debug Log on VirtualBox
(59.72 KiB) Downloaded 72 times
), I understand little about it...

Re: Error paging when kmalloc function is called

Posted: Tue Jul 10, 2012 8:24 pm
by AlexanderSilvaB
berkus You're right, I'm doing things quickly, first I have to learn more about all this... Thank you...

Re: Error paging when kmalloc function is called

Posted: Wed Jul 11, 2012 9:28 am
by JamesM
AlexanderSilvaB wrote:Here is my debug logs on Bochs (
bochsout.txt
) and VirtualBox (
lmx.log.txt
), I understand little about it...
That is not debugging. That is outsourcing debugging.

Re: Error paging when kmalloc function is called

Posted: Thu Jul 12, 2012 6:36 pm
by orighost
I have ever used this code , but I have not found bugs on kmalloc (fit some problems).

Re: Error paging when kmalloc function is called

Posted: Sun Jul 15, 2012 6:43 pm
by AlexanderSilvaB
I finally managed to solve the problem was a bug in my code GDT that was influencing the allocation of memory. Thank you all ...