Standardize comment headers. Patch by Trevor McCort
[reactos.git] / reactos / ntoskrnl / mm / kmap.c
1 /* $Id$
2 *
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
7 *
8 * PROGRAMMERS: David Welch (welch@cwcom.net)
9 */
10
11 /* INCLUDES ****************************************************************/
12
13 #include <ntoskrnl.h>
14 #define NDEBUG
15 #include <internal/debug.h>
16
17 /* GLOBALS *****************************************************************/
18
19 /* FUNCTIONS ***************************************************************/
20 NTSTATUS
21 MiZeroPage(PFN_TYPE Page)
22 {
23 PVOID TempAddress;
24
25 TempAddress = MmCreateHyperspaceMapping(Page);
26 if (TempAddress == NULL)
27 {
28 return(STATUS_NO_MEMORY);
29 }
30 memset(TempAddress, 0, PAGE_SIZE);
31 MmDeleteHyperspaceMapping(TempAddress);
32 return(STATUS_SUCCESS);
33 }
34
35 NTSTATUS
36 MiCopyFromUserPage(PFN_TYPE DestPage, PVOID SourceAddress)
37 {
38 PVOID TempAddress;
39
40 TempAddress = MmCreateHyperspaceMapping(DestPage);
41 if (TempAddress == NULL)
42 {
43 return(STATUS_NO_MEMORY);
44 }
45 memcpy(TempAddress, SourceAddress, PAGE_SIZE);
46 MmDeleteHyperspaceMapping(TempAddress);
47 return(STATUS_SUCCESS);
48 }
49