Error paging when kmalloc function is called

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
AlexanderSilvaB
Posts: 12
Joined: Tue May 08, 2012 6:19 am

Error paging when kmalloc function is called

Post 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.
Lemon X OS
gerryg400
Member
Member
Posts: 1801
Joined: Thu Mar 25, 2010 11:26 pm
Location: Melbourne, Australia

Re: Error paging when kmalloc function is called

Post 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.
If a trainstation is where trains stop, what is a workstation ?
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Re: Error paging when kmalloc function is called

Post 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.
AlexanderSilvaB
Posts: 12
Joined: Tue May 08, 2012 6:19 am

Re: Error paging when kmalloc function is called

Post 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...
Lemon X OS
AlexanderSilvaB
Posts: 12
Joined: Tue May 08, 2012 6:19 am

Re: Error paging when kmalloc function is called

Post by AlexanderSilvaB »

berkus You're right, I'm doing things quickly, first I have to learn more about all this... Thank you...
Lemon X OS
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Re: Error paging when kmalloc function is called

Post 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.
orighost
Posts: 17
Joined: Sun May 27, 2012 8:38 pm

Re: Error paging when kmalloc function is called

Post by orighost »

I have ever used this code , but I have not found bugs on kmalloc (fit some problems).
AlexanderSilvaB
Posts: 12
Joined: Tue May 08, 2012 6:19 am

Re: Error paging when kmalloc function is called

Post 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 ...
Lemon X OS
Post Reply