It’s all about memory
pooladkhay.com·78w
Preview
Report Post

Jun 28, 2024

A comparison of memory management in C vs. Rust.

Intro

When talking about memory, it’s always good to remind ourselves that we have the Stack and the Heap. Stack is pretty straightforward, while Heap is its own beast. In fact, the word memory in "memory management" almost always refers to the Heap memory.

In C, the programmer is in charge of allocating and deallocating the memory which is proven to be very powerful and very dangerous at the same time, leading to in issues like double-free, use-after-free or even using a pointer before initialization, causing [Wild Pointers](https://en.wikipedia.org/wiki/Dangling_pointer#Cause_of_wild_pointers…

Similar Posts

Loading similar posts...