mirror of
https://github.com/reactos/reactos.git
synced 2024-09-11 05:12:43 +00:00
- Remove dead pager.c
- Remove empty aspace.c - Move MmKernelAddressSpace to a header svn path=/trunk/; revision=35406
This commit is contained in:
parent
8b23bceee1
commit
553ffd969a
|
@ -388,6 +388,8 @@ typedef VOID
|
|||
BOOLEAN Dirty
|
||||
);
|
||||
|
||||
PMM_AVL_TABLE MmKernelAddressSpace;
|
||||
|
||||
/* marea.c *******************************************************************/
|
||||
|
||||
NTSTATUS
|
||||
|
|
|
@ -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 <ntoskrnl.h>
|
||||
#include <internal/debug.h>
|
||||
|
||||
#if defined (ALLOC_PRAGMA)
|
||||
#pragma alloc_text(INIT, MmInitializeKernelAddressSpace)
|
||||
#endif
|
||||
|
||||
|
||||
/* GLOBALS ******************************************************************/
|
||||
|
||||
PMM_AVL_TABLE MmKernelAddressSpace;
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
|
||||
/* EOF */
|
|
@ -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 <ntoskrnl.h>
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
||||
/* 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
|
|
@ -364,7 +364,6 @@
|
|||
</directory>
|
||||
</if>
|
||||
<file>anonmem.c</file>
|
||||
<file>aspace.c</file>
|
||||
<file>balance.c</file>
|
||||
<file>cont.c</file>
|
||||
<file>drvlck.c</file>
|
||||
|
@ -380,7 +379,6 @@
|
|||
<file>npool.c</file>
|
||||
<file>pagefile.c</file>
|
||||
<file>pageop.c</file>
|
||||
<file>pager.c</file>
|
||||
<file>pagfault.c</file>
|
||||
<file>paging.c</file>
|
||||
<file>pe.c</file>
|
||||
|
|
Loading…
Reference in a new issue