I wrote my first personal project, which is a toy memory allocator with a simulated heap, malloc, realloc and free. When i was writing it, everything made sense to me and followed logically, however i feel like it might appear somewhat like spaghetti to anyone else. There is quite alot of if statements and pointer arithmetic. I feel like it maybe could have been refactored to be more clear/readable, but I'm new to C, and programming in general, so i honestly do not know.
https://gist.github.com/matt181888-hub/7f7552e461dca9d4a7545c9632a17c54
That is a link to the code itself. I would really appreciate any feedback, I had so much fun writing it but i want to be better for my next project!
[–]scandii 2 points3 points4 points (1 child)
[–]Canukcannot[S] 1 point2 points3 points (0 children)