It’s all about memory
pooladkhay.com·84w

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...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help