Repository navigation
Betterft v1.5.1
Betterft 🚀
What's Up?
Betterft is like the cool cousin of the C library "libft." We spiced things up a bit, but don't worry, it's still the same old library you know. The main twist? We swapped out malloc for the slick galloc function, and it all gets stored in a list we call the Garbage Collector. 🗑️
Garbage Collector, Keeping it Tidy 💽
So, the Garbage Collector is like the guardian of our memory party. Need to clean up the whole place? Hit up cleargarbage. Want to be more selective? Use gfree to free a specific address and kick it off the list.
Mixing it Up 🤘
If you're doing memory business without betterft (no hard feelings, seriously), there's addgarbage to manually add stuff to the Garbage Collector's list. But honestly, all betterft allocations are already on the VIP list.
Version
Current vibe: 1.5.1 🚦
What's New? 🚀
Before, it was crucial to roll with cleargarbage() in all scenarios because the collector was camping out in the heap. But hey, now that it's kicked back in the stack, cleargarbage() is no longer a must-do. You can set your program free from its 'gallocs' with just gfree. Totally up to you! 🤘😎 If you're feeling a bit lazy or want to play it safe to avoid any sneaky leaks, cleargabage() is still in the game – your call! 🚀🗑️
- Replaced heap-allocated Garbage Collector with a static one in the stack, directly returning its address.
- Fixed an issue in gfree function, where the previous value of a node wasn't set to null when becoming the first node in the collector.
Warning! 🚨
Dive into the source file for the full lowdown on how to vibe with Betterft. And don't forget to enjoy the code! 😎✌️
Now go, code a better life with Betterft! 🚀✨
Full Changelog: v1.2...v1.5.1