From 553ffd969a686b2ce5be2fcc73d8f8fc1fb01d2b Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Sun, 17 Aug 2008 12:05:28 +0000 Subject: [PATCH] - Remove dead pager.c - Remove empty aspace.c - Move MmKernelAddressSpace to a header svn path=/trunk/; revision=35406 --- reactos/ntoskrnl/include/internal/mm.h | 2 + reactos/ntoskrnl/mm/aspace.c | 27 ------ reactos/ntoskrnl/mm/pager.c | 109 ----------------------- reactos/ntoskrnl/ntoskrnl-generic.rbuild | 2 - 4 files changed, 2 insertions(+), 138 deletions(-) delete mode 100644 reactos/ntoskrnl/mm/aspace.c delete mode 100644 reactos/ntoskrnl/mm/pager.c diff --git a/reactos/ntoskrnl/include/internal/mm.h b/reactos/ntoskrnl/include/internal/mm.h index 086d70a9ac6..f7fea088cad 100644 --- a/reactos/ntoskrnl/include/internal/mm.h +++ b/reactos/ntoskrnl/include/internal/mm.h @@ -388,6 +388,8 @@ typedef VOID BOOLEAN Dirty ); +PMM_AVL_TABLE MmKernelAddressSpace; + /* marea.c *******************************************************************/ NTSTATUS diff --git a/reactos/ntoskrnl/mm/aspace.c b/reactos/ntoskrnl/mm/aspace.c deleted file mode 100644 index 48b44a08fe6..00000000000 --- a/reactos/ntoskrnl/mm/aspace.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/mm/aspace.c - * PURPOSE: Manages address spaces - * - * PROGRAMMERS: David Welch (welch@cwcom.net) - */ - -/* INCLUDES *****************************************************************/ - -#include -#include - -#if defined (ALLOC_PRAGMA) -#pragma alloc_text(INIT, MmInitializeKernelAddressSpace) -#endif - - -/* GLOBALS ******************************************************************/ - -PMM_AVL_TABLE MmKernelAddressSpace; - -/* FUNCTIONS *****************************************************************/ - - -/* EOF */ diff --git a/reactos/ntoskrnl/mm/pager.c b/reactos/ntoskrnl/mm/pager.c deleted file mode 100644 index 793d73df328..00000000000 --- a/reactos/ntoskrnl/mm/pager.c +++ /dev/null @@ -1,109 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/mm/pager.c - * PURPOSE: Moves infrequently used data out of memory - * - * PROGRAMMERS: David Welch (welch@cwcom.net) - */ - -/* INCLUDES ****************************************************************/ - -#include -#define NDEBUG -#include - -/* GLOBALS *******************************************************************/ - -#if 0 -static HANDLE PagerThreadHandle; -static CLIENT_ID PagerThreadId; -static KEVENT PagerThreadEvent; -static BOOLEAN PagerThreadShouldTerminate; -static ULONG PagerThreadWorkCount; -#endif - -/* FUNCTIONS *****************************************************************/ - -#if 0 -BOOLEAN -MiIsPagerThread(VOID) -{ - return(PsGetCurrentThreadId() == PagerThreadId.UniqueThread); -} - -VOID -MiStartPagerThread(VOID) -{ - ULONG WasWorking; - - WasWorking = InterlockedIncrement(&PagerThreadWorkCount); - if (WasWorking == 1) - { - KeSetEvent(&PagerThreadEvent, IO_NO_INCREMENT, FALSE); - } -} - -VOID -MiStopPagerThread(VOID) -{ - (VOID)InterlockedDecrement(&PagerThreadWorkCount); -} - -static NTSTATUS STDCALL -MmPagerThreadMain(PVOID Ignored) -{ - NTSTATUS Status; - - for(;;) - { - /* Wake for a low memory situation or a terminate request. */ - Status = KeWaitForSingleObject(&PagerThreadEvent, - 0, - KernelMode, - FALSE, - NULL); - if (!NT_SUCCESS(Status)) - { - DbgPrint("PagerThread: Wait failed\n"); - KEBUGCHECK(0); - } - if (PagerThreadShouldTerminate) - { - DbgPrint("PagerThread: Terminating\n"); - return(STATUS_SUCCESS); - } - do - { - /* Try and make some memory available to the system. */ - MmRebalanceMemoryConsumers(); - } - while(PagerThreadWorkCount > 0); - } -} - -NTSTATUS MmInitPagerThread(VOID) -{ - NTSTATUS Status; - - PagerThreadShouldTerminate = FALSE; - PagerThreadWorkCount = 0; - KeInitializeEvent(&PagerThreadEvent, - SynchronizationEvent, - FALSE); - - Status = PsCreateSystemThread(&PagerThreadHandle, - THREAD_ALL_ACCESS, - NULL, - NULL, - &PagerThreadId, - (PKSTART_ROUTINE) MmPagerThreadMain, - NULL); - if (!NT_SUCCESS(Status)) - { - return(Status); - } - - return(STATUS_SUCCESS); -} -#endif diff --git a/reactos/ntoskrnl/ntoskrnl-generic.rbuild b/reactos/ntoskrnl/ntoskrnl-generic.rbuild index 3f72f594a78..dac3192fd75 100644 --- a/reactos/ntoskrnl/ntoskrnl-generic.rbuild +++ b/reactos/ntoskrnl/ntoskrnl-generic.rbuild @@ -364,7 +364,6 @@ anonmem.c - aspace.c balance.c cont.c drvlck.c @@ -380,7 +379,6 @@ npool.c pagefile.c pageop.c - pager.c pagfault.c paging.c pe.c