Author: fireball Date: Fri Jan 25 14:14:44 2008 New Revision: 31982
URL: http://svn.reactos.org/svn/reactos?rev=31982&view=rev Log: - Don't store memory allocation descriptors inside the bootloader, since this memory is unmapped in kernelmode. Fixes a pagefault after switching to paged mode.
Modified: branches/winldr/windows/wlmemory.c
Modified: branches/winldr/windows/wlmemory.c URL: http://svn.reactos.org/svn/reactos/branches/winldr/windows/wlmemory.c?rev=31... ============================================================================== --- branches/winldr/windows/wlmemory.c (original) +++ branches/winldr/windows/wlmemory.c Fri Jan 25 14:14:44 2008 @@ -107,7 +107,7 @@ ULONG PhysicalPageTables; ULONG KernelPageTables;
-MEMORY_ALLOCATION_DESCRIPTOR Mad[1024]; +MEMORY_ALLOCATION_DESCRIPTOR *Mad; ULONG MadCount = 0;
@@ -428,6 +428,9 @@ if (MempAllocatePageTables() == FALSE) return FALSE;
+ // Allocate memory for memory allocation descriptors + Mad = MmHeapAlloc(sizeof(MEMORY_ALLOCATION_DESCRIPTOR) * 1024); + // Setup an entry for each descriptor MemoryMap = MmGetMemoryMap(&NoEntries); if (MemoryMap == NULL)