mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 08:25:48 +00:00
- Bring back old paged pool allocator and use it for paged pool, until ARM3 pool issues are solved.
- Should fix recent regressions. svn path=/trunk/; revision=44904
This commit is contained in:
parent
342f38623c
commit
8113195f32
4 changed files with 1072 additions and 3 deletions
|
@ -193,6 +193,11 @@ ExAllocatePoolWithTag(IN POOL_TYPE PoolType,
|
||||||
KIRQL OldIrql;
|
KIRQL OldIrql;
|
||||||
ULONG BlockSize, i;
|
ULONG BlockSize, i;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Check for paged pool
|
||||||
|
//
|
||||||
|
if (PoolType == PagedPool) return ExAllocatePagedPoolWithTag(PagedPool, NumberOfBytes, Tag);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Some sanity checks
|
// Some sanity checks
|
||||||
//
|
//
|
||||||
|
@ -481,6 +486,19 @@ ExFreePoolWithTag(IN PVOID P,
|
||||||
PPOOL_DESCRIPTOR PoolDesc;
|
PPOOL_DESCRIPTOR PoolDesc;
|
||||||
BOOLEAN Combined = FALSE;
|
BOOLEAN Combined = FALSE;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Check for paged pool
|
||||||
|
//
|
||||||
|
if ((P >= MmPagedPoolBase) &&
|
||||||
|
(P <= (PVOID)((ULONG_PTR)MmPagedPoolBase + MmPagedPoolSize)))
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// Use old allocator
|
||||||
|
//
|
||||||
|
ExFreePagedPool(P);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Quickly deal with big page allocations
|
// Quickly deal with big page allocations
|
||||||
//
|
//
|
||||||
|
|
|
@ -198,6 +198,21 @@ MiInitSystemMemoryAreas()
|
||||||
BoundaryAddressMultiple);
|
BoundaryAddressMultiple);
|
||||||
ASSERT(Status == STATUS_SUCCESS);
|
ASSERT(Status == STATUS_SUCCESS);
|
||||||
|
|
||||||
|
//
|
||||||
|
// And now, ReactOS paged pool
|
||||||
|
//
|
||||||
|
BaseAddress = MmPagedPoolBase;
|
||||||
|
Status = MmCreateMemoryArea(MmGetKernelAddressSpace(),
|
||||||
|
MEMORY_AREA_PAGED_POOL | MEMORY_AREA_STATIC,
|
||||||
|
&BaseAddress,
|
||||||
|
MmPagedPoolSize,
|
||||||
|
PAGE_READWRITE,
|
||||||
|
&MArea,
|
||||||
|
TRUE,
|
||||||
|
0,
|
||||||
|
BoundaryAddressMultiple);
|
||||||
|
ASSERT(Status == STATUS_SUCCESS);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Next, the KPCR
|
// Next, the KPCR
|
||||||
//
|
//
|
||||||
|
@ -272,6 +287,10 @@ MiDbgDumpAddressSpace(VOID)
|
||||||
MmSystemRangeStart,
|
MmSystemRangeStart,
|
||||||
(ULONG_PTR)MmSystemRangeStart + MmBootImageSize,
|
(ULONG_PTR)MmSystemRangeStart + MmBootImageSize,
|
||||||
"Boot Loaded Image");
|
"Boot Loaded Image");
|
||||||
|
DPRINT1(" 0x%p - 0x%p\t%s\n",
|
||||||
|
MmPagedPoolBase,
|
||||||
|
(ULONG_PTR)MmPagedPoolBase + MmPagedPoolSize,
|
||||||
|
"Paged Pool");
|
||||||
DPRINT1(" 0x%p - 0x%p\t%s\n",
|
DPRINT1(" 0x%p - 0x%p\t%s\n",
|
||||||
MmPfnDatabase,
|
MmPfnDatabase,
|
||||||
(ULONG_PTR)MmPfnDatabase + (MxPfnAllocation << PAGE_SHIFT),
|
(ULONG_PTR)MmPfnDatabase + (MxPfnAllocation << PAGE_SHIFT),
|
||||||
|
@ -371,12 +390,20 @@ MmInitSystem(IN ULONG Phase,
|
||||||
MiDbgReadyForPhysical = TRUE;
|
MiDbgReadyForPhysical = TRUE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Put the paged pool after the loaded modules */
|
||||||
|
MmPagedPoolBase = (PVOID)PAGE_ROUND_UP((ULONG_PTR)MmSystemRangeStart +
|
||||||
|
MmBootImageSize);
|
||||||
|
MmPagedPoolSize = MM_PAGED_POOL_SIZE;
|
||||||
|
|
||||||
/* Intialize system memory areas */
|
/* Intialize system memory areas */
|
||||||
MiInitSystemMemoryAreas();
|
MiInitSystemMemoryAreas();
|
||||||
|
|
||||||
/* Dump the address space */
|
/* Dump the address space */
|
||||||
MiDbgDumpAddressSpace();
|
MiDbgDumpAddressSpace();
|
||||||
|
|
||||||
|
/* Initialize paged pool */
|
||||||
|
MmInitializePagedPool();
|
||||||
|
|
||||||
/* Initialize working sets */
|
/* Initialize working sets */
|
||||||
MmInitializeMemoryConsumer(MC_USER, MmTrimUserMemory);
|
MmInitializeMemoryConsumer(MC_USER, MmTrimUserMemory);
|
||||||
|
|
||||||
|
|
1023
reactos/ntoskrnl/mm/ppool.c
Normal file
1023
reactos/ntoskrnl/mm/ppool.c
Normal file
File diff suppressed because it is too large
Load diff
|
@ -414,6 +414,7 @@
|
||||||
<file>pagefile.c</file>
|
<file>pagefile.c</file>
|
||||||
<file>pageop.c</file>
|
<file>pageop.c</file>
|
||||||
<file>pe.c</file>
|
<file>pe.c</file>
|
||||||
|
<file>ppool.c</file>
|
||||||
<file>procsup.c</file>
|
<file>procsup.c</file>
|
||||||
<file>region.c</file>
|
<file>region.c</file>
|
||||||
<file>rmap.c</file>
|
<file>rmap.c</file>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue