[Autogenerated] we know that when the process starts its
life most of its address space is empty.
There's nothing there only anti Dll and executable is
mapped into the address space of a process.
Now every process has its own every process has lots of pages
obviously that are part of the address space which maybe two
gigabytes for gigabytes or 128 terabytes in size.
What is the state of each one of these pages?
In fact the three possible states one of them,
which is the most common, is called free.
It means there's just nothing there as men most of the address
space of a newly created process is empty.
Most of these pages are free,
there's nothing there which means that any attempt to access that memory
will immediately cause access violation exception.
There's simply nothing there which by default will cause the process to _____.
The opposite of free is committed committed means
allocated means memory we can use for sure.
So for example, if you call a simple function like monologue from the C runtime.
The point where you get back assuming it's not now
that points to committed memory,
this means this is memory you're actually wasting your actually using.
So the system has to make sure that it can give you that memory.
And if you get a non null point of then that memory is yours,
which means that accessing that memory will never fail.
It is possible that this memory may be paged out to a page file later on and
then when you make the access a page fault would occur,
which would cause the memory manager to bring back that data from disk back to
ram fix the page tables and tell the process or to try again.
But from your perspective as the one making the access,
you don't know that this is happening and you don't really need to care,
you know that this is bound to succeed, there's no way this could fail.
That's the meaning of committed.
The system is committed to giving you that memory when you need it.
The commitment is there?
This is the memory you typically allocate and you really wasting.
Now there's a middle ground or at least some sort of middle ground
called reserved reserved pages are reserved memory represents an
address range which is not allocated.
So it's the same as free in terms of trying to access it.
If you try to access reserve memory there's nothing there and
you'll get an access violation exception.
However, that range is reserved for some future purpose.
We've seen one example of using reserved memory in the
previous course related to threats,
we know that using more thread stack is global and grows based on this idea of
having a large or some sized chunk of reserve memory with with only a small
chunk being committed and that commitment chunk is increased as needed based on
the actual usage of the thread for its stack.
So reserved memory from the memory manager's
perspective and the processor's perspective,
there's nothing there.
However,
the memory manager does store information in a data structure called
virtual address descriptors that provide a way to manage and to have
information about the address space of a process.
It stores that information, saying, hey, that range is reserved.
And so if a new location is requesting the process,
it's not going to happen in that range unless explicitly that range is,
is requested.
So that's reserved member.
And we'll see the differences between reserve and committed
memory in one of the next demos in a more uh,
kind of powerful way.