Mastering Memory: Allocation Techniques in C, C++, and ARM Assembly

preview_player
Показать описание
In this video, we explore equivalent memory allocation techniques in C++, C, and raw ARM assembly. We discuss the methods and system calls associated with each language to allocate then free memory once a dynamic variable is no longer required.

---

Timestamps:
00:00 Intro
01:46 C++ Memory Allocation
05:41 C Memory Allocation
09:50 ARMv7 Assembly Memory Allocation
16:18 Conclusion

---
LaurieWired Socials:
Рекомендации по теме
Комментарии
Автор

I very rarely watch tutorials but the arm segment made this video worth watching.

gmjammin
Автор

Not only appreciating the low-level information in the tutorial, but also loving the SE: Lain production aesthetics!

StellarFireflyGaming-rmxu
Автор

I just discovered this channel, the visuals are super neat! The computers in the background, the Windows XP task bar and the window border around the web cam, wow!

JannisAdmek
Автор

Oh man, there are so many callouts to Serial Experiments: Lain in your staging/setting! Long time since I watched it, I love it!

PapaSMURFFS
Автор

The amount of effort and dedication you put in editing these videos is commendable👏
Great tutorial as always!

sudhanshugorwadkar
Автор

Heads up for anyone working in C, you don't need to worry about casting the return value of malloc. Unlike in C++, void* will implicitly cast to other pointer types without throwing an invalid conversion error. This just maintains symmetry with casting *to* void* which is implicit in both C and C++. It's ultimately a stylistic decision whether to keep the explicit casts even though they're redundant, but my understanding of what idiomatic C looks like involves just letting the language cast void* for you in basically every situation.

TetrisMaster
Автор

Current C++ core guidelines actually recommend against directly using new and delete in favor of smart pointers. std::make_unique and std::make_shared are the way to go. I also get that it's important to understand new and delete. Hats off to you for doing memory management in assembly!

jessedevore
Автор

I like that you use the universal answer to everything for the content of the memory.

chutipascal
Автор

The effor to create the vfx for those videos are something to marvel on its own...
What impresses me is that the content is even greater.
I know my way around 6502 asm and seeing this made me want to do arm asm just because...

BrunoSXS
Автор

Thank you Laurie you have a rare talent - a thoroughly clear teaching approach. You provide just enough explanation of the reasoning, process and context without overloading the topic. Enjoying the low level assembly language perspective.

gustinian
Автор

Never subscribed to a channel so fast! What a really cool style of video, with clear, helpful explanations. Good up the good work :D <3

chari
Автор

I really hope this channel takes off. You put a ton of effort into your content!

fios
Автор

What a wonderful gem of a video! Love the technical deep dive and the graphic design!

rmfeld
Автор

Great video! Especially the assembly section.

In my (albeit limited) experience, it often helps to allocate memory in terms of pages rather than individual bytes. The page size is definitely not a consistent or constant standard value that you can simply hardcode in your programs. Effects of page size (fragmentation or page faults) are super apparent when deploying anything large-ish scale (say PostgreSQL db) on your ARM device. If you insist on doing everything in assembly, make sure your program adjusts for this variability in page size when compiling and makes it so that certain variables are "aligned" well for faster access.

Your C compiler will most likely already handle all of this better than you without you even realizing it which is why in my opinion, programming in C is a "safer" bet for performance, readability and your own sanity.

stacksmasherninja
Автор

This channel is really impressive. You seem to have everything down somehow - you know a ton about the subject matter, your presenting is brilliant and you can distil your knowledge down, the video style and presentation is fantastic, and so is the cinematography. Really everything is brilliant, and it's clear you're still improving (e.g. I looked through the channel and your thumbnails have gotten way better over the past several months - I love this one and the recursion one).

Can't believe I haven't seen your videos sooner. Looks like the algorithm has latched onto them though as I'm getting suggested a bunch recently.

lostyt
Автор

Love the lain vibes
Absoluetly a treasure of a show.

Also, love the walk through thank you for making this walk through

LadyTink
Автор

Great series! I wanted to learn ARM assembly in my spare time and your videos are bite-sized and friendly to newbies

bdfb-thek
Автор

Wonderful video. I love the comparisons between C & C++ and ASM. These are my types of video, contrast and comparison!

MichaelSmithzer
Автор

This my first video of yours I’ve found (thank you algorithm!) and I absolutely love your style. You’re an excellent presenter and the thematic aspects of an old Apple style GUI is charming without being repetitive. Instant subscribe!

One small piece of feedback, the dark blue text on a black background was really hard for me to read with my color blindness, just a small thing but wanted to mention it.

Beastintheomlet
Автор

Perfect. Nowadays people do not have any idea about low level. Congratulations for bringing up your knowledge.

julianocardarelli