Edit: My paging code was the issue the whole time.
Thanks for everything anyway guys.
--------
Hi!
I'm having some trouble with getting my memory manager working.
My linked list root entry gets corrupted after a big number of frame allocations, I'm think I am somehow accessing reserved memory.
But I'm really unsure if that is the case or if my paging code is wrong.
The problem is that after 137 frame allocation the root elements .prev somehow points to itself and creates a infinite-loop, when I try to combine free chunks.
If I add a check here https://github.com/Vild/PowerNex/blob/O ... eap.d#L103, to make sure that freeChunk is not equal to freeChunk.prev, I get a General Protection fault after 192 frame allocations.
Hopefully someone can help me find what I am doing wrong or point me in the right direction.
All help is appreciated.
- Dan
Debug output (COM1)
QEMU interrupt output
The code for the heap: heap.d
The General protection interrupt log files:
Debug output (COM1)
QEMU interrupt output
Prebuild iso: http://wild.tk/powernex.iso (20Mb)
Prebuild iso with the .prev check: http://wild.tk/powernexGE.iso (20Mb)
Github: https://github.com/Vild/PowerNex/tree/O ... src/memory The code is written in D.
[Solved]Memory allocation corruption problems
[Solved]Memory allocation corruption problems
Last edited by Vild on Sat Feb 13, 2016 3:57 pm, edited 1 time in total.
Re: Memory allocation corruption problems
Try to make a version for user space and use the unit testing.
Re: Memory allocation corruption problems
I realized that my whole code was really dumb made, and it seems like my paging code was behind the whole thing so I'm starting to redesign it.shmx wrote:Try to make a version for user space and use the unit testing.
Thanks anyway