The off-by-one errors are because MmPageArraySize is: MmPageArraySize = MmHighestPhysicalPage; and not MmPageArraySize = MmHighestPhysicalPage + 1;
Just my 2 cents, Pablo
On Fri, 15 Feb 2008, ros-arm-bringup@svn.reactos.org wrote:
Author: ros-arm-bringup Date: Fri Feb 15 04:04:22 2008 New Revision: 32371
URL: http://svn.reactos.org/svn/reactos?rev=32371&view=rev Log: Fixed several off-by-one errors when playing with the PFN database array size. Among other things, certain valid pages would be considered invalid, and also the PFN database wouldn't be properly erased on startup (which would result in a crash after a warm reboot or restarting the emulator).
Modified: trunk/reactos/ntoskrnl/mm/freelist.c