What is 'the heap' ? #programming #coding #lowcode

preview_player
Показать описание

WTF EVEN IS A HEAP???? 📚🚀 #Cplusplus #CodingTips #OperatorOverloading #MatrixMultiplication #CodeTricks

🔥🔥🔥 SOCIALS 🔥🔥🔥
Рекомендации по теме
Комментарии
Автор

Maturity is when you realize c is a 'high level programming language'

justicelegends
Автор

First PirateSoftware, now this guy.
Youtube is revitalizing my lost will to learn to code.
Alright, let's see what happens.

egotrip
Автор

The stack is an arbitrary chunk of memory too. It's all just....memory. The stack pointer register is really the only thing the hardware "knows" about. It's up to the compiler to generate commands that incr/decr the SP, to place things on the stack relative to the SP, and to look on the stack for where it placed things. All of that is software controlled.

heroclixrz
Автор

The best family trip I’ve ever been on

almazingsker
Автор

“C is not a low level language”
Highly recommend this article

felixkunze
Автор

You can also write your own memory allocator as well, instead of using the default provided through malloc. Some programs that need very high performance and have unique allocation patterns do it.

MarkWatsonY
Автор

Another thing that might be good to know if you are the person asking the original question is that you can switch out your allocator if you want. You don't have to use the libc allocator if you don't want to.
At work we use jemalloc (which is a very widely used one) but we have also had others as well.

Olodus
Автор

"we can all go do it together as a family."

Dad?

kja
Автор

It’s cool because we learn all this in our OS and Assembly classes as well as coding our own versions.

matthewread
Автор

Not only that, you can implement your own allocator on top of another allocator. Which might be working on top of another allocator and so on.

alexanderd.
Автор

Confuses me a lot as well. Thanks for the clarification!

tommyhuffman
Автор

Thank you for this short. I’m starting to study to be a computer engineer but I’ve been stuck trying to learn C and watching this makes me want to keep pushing. Not sure why, it just did so thanks :)

eduardoduran
Автор

the stack isn’t hardware either, right?

*edit:* I believe the conclusion is yes and no: no there's no specific memory or anything similar dedicated to being the stack, but yes there are stack registers and several specialized instructions that manipulate the stack using these registers. so, kinda, kinda not.

asdfghyter
Автор

Yes. More or less like that. It is your MMU processor that manages a virtual table which translates to physical addresses. When you request more memory, lots of work go on on thr background so the SO can have the biggest chunk of memory. This is also where SLR happens

motbus
Автор

Recently had a presentation about OS memory management in uni. Fun to see how it relates to the programming as well

kexerino
Автор

Building my own malloc for a class was the hardest thing I’ve ever done

bigthinkie
Автор

Great content as always man. Appreciate it!

lightspd
Автор

You can also go read the implementation of the systemcall that malloc uses to see how the kernel actually does the allocation too :D

platinummyrr
Автор

Omg this short clip made me finally understand malloc

tintorhd
Автор

For one of my OS class assignments I had to implement malloc. It was a great way to teach how this stuff works.

kylemsguy_