cleaning out memory areas

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
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

cleaning out memory areas

Post by distantvoices »

After a few days of hard debugging, I 've found one source of obscure bugs - maybe it is the solution to get rid of a vast majority of them - anyways, I gonna tell you something crucial and to some of you maybe logical, be it due to experience be it due to education:

Clean out Page Directories and Page Tables! Don't rely on only zeroing the dealt out memory areas.

Say: zero out page directory before mapping in the kernel land (simply put in the PDE's at the corresponding places).
Zero out each page table ere you enter any pages. Your MMU might find a "valid" page and use it - and this might not be what you want.

To say it in short:

Zero out all management tables too.

Page Directory and Page Tables.

I just needed to put this here. It has caused me way a lot of headache and wondering: why does it work on this PC and not on any other??!! *damn*

Hope, you can benefit from my atrocious moron-ness.
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
aladdin

Re:cleaning out memory areas

Post by aladdin »

can u tell the configuration of these PCs.
have you tested it on tow PCs that have the same CPUs or not ?
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:cleaning out memory areas

Post by distantvoices »

My three machines at home:

amd athlon xp 1700+, asus mobo,512 mb memory
amd thunderbird 750 mhz, abit mobo,128 mb memory
--> on these two it worked without cleaning out anything - albeit obscure bugs kept appearing. Dito in VMWare.

Toshiba Satellite 1700/300 laptop with Intel Celeron 650 MHZ cpu and 128 mb memory --> on this one it refused to work without cleaning out. With cleaning and zeroing, it works like a charm on this stubborn machine - and the obscure bugs seem to be gone pour la plus-part.

With a HP-Computer (Asus Mobo, Intel Pention III 500 mhz,64 MB memory) it worked also - without cleaning out - but now, with the zeroing and cleaning stuff - much better.

Hope this helps
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
Post Reply