‫Hello and welcome.
‫And in this lecture, we're just going to fix some minor bug now in business to do code, I just want
‫you to go to process starts, see and we'll see process map.
‫Lf you'll notice that I mapped this based on the size.
‫OK, so I go plus peafowl size.
‫Now the problem is peafowl size can actually be zero in some cases and the memory size can be more than
‫zero.
‫So the value we should have been using really is p mem size, not peafowl size.
‫Now if you don't do this further on in the course, the pages won't be mapped correctly and you'll run
‫into page faults when doing things that should work.
‫So make sure you do change that from peafowl size to meme's size.
‫That's very, very important and that will ensure that everything should work OK.
‫So simply put, pitmen size is the size it is in memory and peafowl size is the father is on the file.
‫Now, I'll give you an example of when peafowl size is zero.
‫Beppie mem size can be 12 or something.
‫Right.
‫Essentially, a perfect example of that is a static variable inside a function static array variable.
‫Now, there is no need for that to contain any size on disk.
‫So there isn't.
‫It's zero, but the size might be 12 or something, as you will see when we go to implement it.
‫It's a function which we'll get to shortly.
‫So by using premium size, it ensures that it uses the actual size in memory rather than the size on
‫disk.
‫If you use peafowl size, this will try to map to physical address plus zero, which will result in
‫the virtual page, not mapping to the physical page correctly, which will mean your user process won't
‫be able to see its own process, memory, certain parts of its own process, memory, and then if it
‫tries to access those addresses, it will obviously run into a page file.
‫So, yeah, make sure you've done that.
‫And once you've done that, that fixes that minor little bug going forward.
‫Thank you.