I got to avoid memory management for quite some time
I got to avoid memory management for quite some time
Finally I have a valid reason to learn about memory management. It was also hella weird when encountering it.
I got to avoid memory management for quite some time
Finally I have a valid reason to learn about memory management. It was also hella weird when encountering it.
Valgrind to the rescue
It'll be fun when you get to funny errors because you used free
d memory.
When I was learning about linked lists and decided to use them in a project, I "removed" items by making the previous item's next
point to this item's next
, except I misplaced a call to free
before using the fields, and it somehow still worked most of the time on debug builds, but on optimized builds it would cause a segmentation fault 100% of the time.
Unused memory is wasted memory
Cloud providers LOVE you with this one quick trick!
and with a good enough leak, the amount of unused memory will become negative!
You haven't lived until you've produced a memory leak in JavaScript.
Congratulations! Now you can get a job at Fortinet.
(Fortinet is a network security vendor...think firewalls, HLBs, etc. They get an ungodly amount of memory leak bugs, or at least far more than you would expect from an enterprise firewall)
Get a job playing Fortnite, got it
(Insert image of Kronk here)
is this some genX meme that I'm too millennial to understand?
Learn some C you whippersnapper! You ain't gonna become a proper programmer unless you understand your basic low level concepts well!
The youth nowadays, always hiding behind abstractions of abstractions that 90% of the time are just C wrappers anyway /j
(written by an early 20s PHP dev LOL. Although I do plan on learning C quite a bit before I move to C++ and ultimately Rust)
I've used C++20 on embedded devices and the generated code was simpler than the C version. Why do you still use C?
I want to learn rust and got the recommendation to learn C first.
C is a 100% valid language to spend your time on.
Probably a good idea. I decided to learn Rust after using Python for a couple years. I took a semester of C++ but barely remember anything. Maybe I should write a project in C and rewrite later in Rust. I personally only learn when I get inspiration to make a program, which means I learn on the spot. I don't think it is the best way to do things (if I knew the language better I may make better decisions), but it is the only way I can motivate myself to learn.
C is useless nowadays (and has been for at least 20 years). Either learn Rust or C++.
Cruft can be a hard thing to debug. Mainly when you're not used to memory issues and haven't learned all the best practices.
There's also zig if you want to play with memory. You'll know a lot about allocation, that's for sure.
And then OP used valgrind
I did not knew this existed, so thanks for the tip.
have fun (ノಠ益ಠ)ノ彡┻━┻