Well, I’m temporarily done with exams and international stuff. Motivation letters and CVs are sent, and I must receive some positive or negative answers before this thing goes any further. So I have finally my week-ends back. Since the next one lasts 5 days, I just hope I’ll be able to do something with it.
This week-end, even though I was mostly busy celebrating my birthday, I’ve already been able to get some coding work done. Well, a strange kind of work, in fact. Basically I’ve just realized that most of the problems I’ve encountered with my codebase in the last few months could be avoided with a simple trick, and got rid of half of the code I’ve written in that time. More precisely…
- I have a map of physical memory.
- My kernel’s virtual address space just mirrors physical memory in a byte-perfect fashion with RW access rights, except for a few exceptions.
- I was trying to make a map of the kernel’s virtual address space.
See the trick ? By simply considering that the kernel’s virtual address space just mirrors physical memory and that mapping it is not useful, I’ve suddenly got rid of a huge amount of code vainly attempting to keep the maps of physical memory and the kernel’s virtual address space in sync.
Of course, it’s not *that* simple. The “few exceptions” mentioned above must be taken into account. But still, the job suddenly got much easier. I love those days where I discover that a feature I had been working on for some times was totally useless and is better removed…