Hey everybody.
Welcome to the mini module called memory.
Now we're gonna go over a little bit of what memory is and the different aspects of it.
Now what is memory.
Memory is in a nutshell a physical chip on your machine that's used to hold chunks of data while the
computer is running.
Now this is volatile data so it will be gone when your machine turns off.
This is commonly used to store the program code.
Some of the data around it the kernel all the all applications will use memory in some way shape or
form.
This also includes the operating system and most memory is related to his ram at least in this war.
And we talked about in this case which is random access memory.
And this is called random access because it doesn't have to go through the whole chip defined one bit
of data.
It can go directly to the data without having to go through the full set.
Now how is it used in an operating system now an application will load the data itself into memory.
So the program code for example when we looked at the P E files the loading all of those tables all
the code segments the data segments the BSF segments all of that stuff gets loaded into memory and an
application has an entry point.
So you might have seen this as the word main in another in most applications but there's an entry point
or an entry memory address for an application for every application an E IP will start executing and
moving through the code based on where the entry point is.
Now there is virtual memory as well.
So it's not just all physical memory it's virtual as well.
So what happens is this is also called swaps.
So when a machine is too memory intensive maybe we're running closed out of memory.
It'll start converting to something called swap now swap loads parts of memory regions onto the harddrive
instead of into ram the ram chip itself.
Now this is done to conserve the space it's also done to not allow you to run out of memory.
There's thresholds that you can set on on most systems we're not going to go over that in this particular
video.
But what's important to note is swap is much slower to read because it has to go to the drive.
Find out where the data is load the data back in the memory and then reformat it back into a memory
structure which is a lot slower than just having it ready and available.
So it's important to understand that we're not going to go into swaps specifically feel free to read
up a little bit more on swap in general but swap is enabled on most systems now the memory structure
here is a loose term.
What we're going to be looking mainly at is the stack in the heap which we have our own videos for now.
Memory also contains readable and non readable regions or sections as well as executable and non executable.
This is important to know because if you get something called a you know access read only memory that
means you're trying to write data to a read only memory address which is a non rateable section.
Now it's important to know that because of as a red timer because when you start building exploits or
working with exploits you may run into one of these problems where the memory address you over flown
to is either not executable or not rateable and you need to be able to work around that.