3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS kernel
5 * FILE: ntoskrnl/mm/kmap.c
6 * PURPOSE: Implements the kernel memory pool
8 * PROGRAMMERS: David Welch (welch@cwcom.net)
11 /* INCLUDES ****************************************************************/
15 #include <internal/debug.h>
17 /* GLOBALS *****************************************************************/
19 /* FUNCTIONS ***************************************************************/
22 MiZeroPage(PFN_TYPE Page
)
26 TempAddress
= MmCreateHyperspaceMapping(Page
);
27 if (TempAddress
== NULL
)
29 return(STATUS_NO_MEMORY
);
31 memset(TempAddress
, 0, PAGE_SIZE
);
32 MmDeleteHyperspaceMapping(TempAddress
);
33 return(STATUS_SUCCESS
);
38 MiCopyFromUserPage(PFN_TYPE DestPage
, PVOID SourceAddress
)
42 TempAddress
= MmCreateHyperspaceMapping(DestPage
);
43 if (TempAddress
== NULL
)
45 return(STATUS_NO_MEMORY
);
47 memcpy(TempAddress
, SourceAddress
, PAGE_SIZE
);
48 MmDeleteHyperspaceMapping(TempAddress
);
49 return(STATUS_SUCCESS
);