CST 334 - Week 3

Week 3 Summary:

This week in CST 334 was a rollercoaster. We started working on PA3, which is all about building a memory allocator. Basically our own version of malloc() and free(). At first, I thought, “okay cool, pointers and structs again,” but this assignment humbled me quick. Managing memory manually, keeping track of chunks, splitting them, and then coalescing them back together sounds simple on paper but actually implementing it without causing segmentation faults or crashing everything was tough.

One thing that stood out was just how fragile everything becomes when you're directly manipulating memory. A wrong pointer or forgetting to update a linked list will break the whole thing. A lot of my time was spent debugging and going through each line of my code just to figure out where things were going sideways. The split_node function specifically gave me a hard time. It took me a while to realize how important it is to keep the fwd and bwd pointers clean or everything falls apart. But once I fixed that and understood how the free list is supposed to stay ordered and coalesced, stuff started to click. Also, seeing how test cases are written to intentionally break your code kind of made me more aware of edge cases I usually wouldn’t think about.

This project definitely pushed my understanding of low-level memory handling way further than anything we’ve done so far. It’s frustrating but also kinda cool seeing how allocators actually work under the hood. Makes me appreciate how much is going on behind the scenes in regular C programs that use dynamic memory.

Comments

Popular posts from this blog

Week 4 - Educational & Career Goals, ETS Readiness, and Learning Reflections

Week 2 - Learning Strategies | Time Management | Project Management | Previous Capstones | Week Summary

Week 5 - Team Comments, Capstone Ideas, Weekly Journal, Industry Expert Interview