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 ***************************************************************/
21 MiZeroPage(PFN_TYPE Page
)
25 TempAddress
= MmCreateHyperspaceMapping(Page
);
26 if (TempAddress
== NULL
)
28 return(STATUS_NO_MEMORY
);
30 memset(TempAddress
, 0, PAGE_SIZE
);
31 MmDeleteHyperspaceMapping(TempAddress
);
32 return(STATUS_SUCCESS
);
36 MiCopyFromUserPage(PFN_TYPE DestPage
, PVOID SourceAddress
)
40 TempAddress
= MmCreateHyperspaceMapping(DestPage
);
41 if (TempAddress
== NULL
)
43 return(STATUS_NO_MEMORY
);
45 memcpy(TempAddress
, SourceAddress
, PAGE_SIZE
);
46 MmDeleteHyperspaceMapping(TempAddress
);
47 return(STATUS_SUCCESS
);