b7a089b8419865142f0b677f689206766bd1ac2e
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 * PROGRAMMER: David Welch (welch@cwcom.net)
10 /* INCLUDES ****************************************************************/
14 #include <internal/debug.h>
16 /* GLOBALS *****************************************************************/
18 /* FUNCTIONS ***************************************************************/
20 MiZeroPage(PFN_TYPE Page
)
24 TempAddress
= MmCreateHyperspaceMapping(Page
);
25 if (TempAddress
== NULL
)
27 return(STATUS_NO_MEMORY
);
29 memset(TempAddress
, 0, PAGE_SIZE
);
30 MmDeleteHyperspaceMapping(TempAddress
);
31 return(STATUS_SUCCESS
);
35 MiCopyFromUserPage(PFN_TYPE DestPage
, PVOID SourceAddress
)
39 TempAddress
= MmCreateHyperspaceMapping(DestPage
);
40 if (TempAddress
== NULL
)
42 return(STATUS_NO_MEMORY
);
44 memcpy(TempAddress
, SourceAddress
, PAGE_SIZE
);
45 MmDeleteHyperspaceMapping(TempAddress
);
46 return(STATUS_SUCCESS
);