Your Computer is Lying To You (Virtual Memory)

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

Your Computer is Lying To You (Virtual Memory) // New programmers usually don't understand how memory works. Addresses are addresses, right? This video gives a short introduction into what virtual memory is and—at a high level—how it works.

***

Welcome! I post videos that help you learn to program and become a more confident software developer. I cover beginner-to-advanced systems topics ranging from network programming, threads, processes, operating systems, embedded systems and others. My goal is to help you get under-the-hood and better understand how computers work and how you can use them to become stronger students and more capable professional developers.

About me: I'm a computer scientist, electrical engineer, researcher, and teacher. I specialize in embedded systems, mobile computing, sensor networks, and the Internet of Things. I teach systems and networking courses at Clemson University, where I also lead the PERSIST research lab.

More about me and what I do:

To Support the Channel:
+ like, subscribe, spread the word

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

I am learning a lot with your low level code explanation videos. It is very useful to me. Thank you very much

umpoucosobreconhecimentos
Автор

you are hands down the best youtuber when it comes to explaining C coding, memory and computer science overall for beginners like me! the clearest explanation possible! huge thanks from Russia

olegfare
Автор

Best Comp Sci professor I have never paid for, thanks for sharing your knowledge sir.

tranqilo
Автор

4:22 mostly, the system tries to do that, the hardware MMU helps a bit, but it eventually fail, and the machine can crash, although rarely

monad_tcp
Автор

Yeah, OSes provide a lot of abstractions *eg. device drivers* from the core functions like inb(), outb() or memset()

georgecop
Автор

Hi Jacob, Big fan of you! I have question if address are virtual then why we bothering about memmove of address overlapping.. it will be translated by MMU right?

Gauthamphongalkar
Автор

I didn't notice that compiler always puts variables on the same addresses so I always wondered how buffer overflow attacks are done. I have watched some video about it and I never understood how you know with what number to overwrite the place on the stack where the previous instruction pointer is.

smrtfasizmu
Автор

do you got Twitter? I tried searching for you with no avail. just wanted to let you know that you are awesome man. I love your C videos. please keep up the good work. 🖖

foadsf
Автор

What Linux distro are you using? On my Ubuntu 21.10, the address of x does change every run. However, if I build with "-Wl, --no-pie", then yes, it's a static address each run, so I think your results are highly dependent on what default compiler/linker options your Linux distro is using.

funkykong
Автор

How are you running macOS and Linux together, are you using a remote machine? Also why the compiler chooses address for x so big, it can even choose something like 0x1 or 0x2 or whatever (I know choosing such big addresses doesn’t make the os allocate tonnes of memory [learned from one of your video]). Thanks in advance, amazing video.

raghavsrivastava
Автор

Does that -no-pie work with gcc?.
I don't think so, it still produces random address for me on linux.

nnkbrain
Автор

my question is, why doesn't realloc always return the same pointer? so let's say we need 2MB of memory but there is not a chunk available on our physical memory, so our data is moved further. but all that needs to be changed is the virtual address to physical address map.

similarly, this could be done for the variables in stack too. right?

mehregankbi
Автор

This is so low level that I missed bad paintings for better understanding

krumpy
Автор

source code available during office hours at, that was what came to mind when listening to this, i cant seem to figure out why, can someone help ?

JusticeNDOU
Автор

Jokes on it, I manipulate the crap out of it everyday!
We have a very abusive relationship

XenoTravis
welcome to shbcf.ru