Sunday 16 June 2013

Understanding Page Frame Number Lists

I'm in the mood to write a proper blog post this time, with a real-life example of debugging a Stop 0x4E, which is still currently in process of being debugged.

Okay, so let's begin with explaining what is a PFN List and how the operating system uses this list.

The Windows Memory Management system organizes all physical pages of memory into a large one dimensional array, which allows the operating system to conveniently access each page (Page Frame database); each page is given referenced with a Page Frame Number entry. 

If you have ever programmed in almost any kind of modern programming language, then you will understand what a one-dimensional array is, however, for those who do not understand then I will briefly explain what it is. Remember Windows is written in C++, and therefore I will explain it in terms of C++. A array is a data structure used in programming, to store variables of the same type in one continuous memory block, this makes more efficient to access certain parts of data.

A Stop 0x4E can be caused by device drivers writing and accessing invalid memory locations, we can use Driver Verifier to check for any drivers which may be causing issues.

Another cause is, corrupted RAM and incorrect handling of MDLs (Memory Descriptor Lists), which is a data structure used in I/O requests to map a process' virtual memory address to the physical memory address; the MDL locks the physical page for the driver. More Information about MDLs.

If you would like to follow my current debugging efforts on a Stop 0x4E, then your more than welcome to do so, and can view this thread for any updates - Memory_Management and PFN_LIST_CORRUPT.




No comments:

Post a Comment