CST 334 - Week 4
CST 334 Week 4:
This week was honestly a bit of a grind, but I learned a lot. We were working on virtual memory and page tables stuff I’ve heard of before but never actually had to code myself. The main task was writing a function that maps a virtual page to a physical one, while setting all the right permissions like read, write, and execute. Sounds straightforward, but once I started getting into bit manipulation and flags, it got confusing really fast. One tiny mistake like shifting something the wrong way or using the wrong constant would break everything, and sometimes the errors didn’t even point me in the right direction. On top of that, clang-tidy was being super picky this week. It wasn’t just finding actual bugs it was complaining about random stuff like not having curly braces around one line if statements or using a plain number like 8 in a calculation. At first, I didn’t even understand what the warnings were trying to say. I ended up copying the error logs into ChatGPT just to make sense of them and honestly that helped a lot. Once I figured out what clang-tidy actually wanted, I started fixing things one by one. I still think some of the rules are kind of excessive, but I get the point of writing clean, consistent code, really does make everything easier to understand especially when you're working this deep into how memory works. After cleaning my code it worked better and I actually understood it more too. By the end of the week I got most of it to work and it felt good to figure it out. This was probably the first time I really started to appreciate how complex memory management is behind the scenes. It’s easy to take it for granted, but the OS is doing a lot of work to make things look simple. Tiring week, but a rewarding one too.
Comments
Post a Comment