ReactOS  0.4.14-dev-583-g2a1ba2c
memory.h
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: GPLv2+ - See COPYING in the top level directory
3  * PROJECT: ReactOS Virtual DOS Machine
4  * FILE: subsystems/mvdm/ntvdm/memory.h
5  * PURPOSE: Memory Management
6  * PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
7  */
8 
9 #ifndef _MEMORY_H_
10 #define _MEMORY_H_
11 
12 /* DEFINITIONS ****************************************************************/
13 
14 #define TOTAL_PAGES (MAX_ADDRESS / PAGE_SIZE)
15 
16 typedef VOID
18 (
19  ULONG Address,
20  PVOID Buffer,
21  ULONG Size
22 );
23 
24 typedef BOOLEAN
26 (
27  ULONG Address,
28  PVOID Buffer,
29  ULONG Size
30 );
31 
32 /* FUNCTIONS ******************************************************************/
33 
36 VOID MemExceptionHandler(ULONG FaultAddress, BOOLEAN Writing);
37 
38 VOID
41 (
42  PFAST486_STATE State,
43  ULONG Address,
44  PVOID Buffer,
45  ULONG Size
46 );
47 
48 VOID
51 (
52  PFAST486_STATE State,
53  ULONG Address,
54  PVOID Buffer,
55  ULONG Size
56 );
57 
58 VOID
61 (
62  PFAST486_STATE State,
63  ULONG DestAddress,
64  ULONG SrcAddress,
65  ULONG Size
66 );
67 
70 
71 BOOL
73 (
74  PVOID Address,
75  ULONG Size,
76  PMEMORY_READ_HANDLER ReadHandler,
77  PMEMORY_WRITE_HANDLER WriteHandler
78 );
79 
80 BOOL
82 (
83  PVOID Address,
84  ULONG Size
85 );
86 
87 BOOLEAN
89 (
90  ULONG StartAddress,
91  PULONG Length,
92  PBOOLEAN Hooked
93 );
94 
95 #endif /* _MEMORY_H_ */
VOID MemExceptionHandler(ULONG FaultAddress, BOOLEAN Writing)
Definition: memory.c:283
VOID(FASTCALL * PMEMORY_READ_HANDLER)(ULONG Address, PVOID Buffer, ULONG Size)
Definition: memory.h:18
VOID MemCleanup(VOID)
Definition: memory.c:780
BOOLEAN(FASTCALL * PMEMORY_WRITE_HANDLER)(ULONG Address, PVOID Buffer, ULONG Size)
Definition: memory.h:26
#define FASTCALL
Definition: nt_native.h:50
BOOLEAN MemQueryMemoryZone(ULONG StartAddress, PULONG Length, PBOOLEAN Hooked)
Definition: memory.c:378
BOOL MemInstallFastMemoryHook(PVOID Address, ULONG Size, PMEMORY_READ_HANDLER ReadHandler, PMEMORY_WRITE_HANDLER WriteHandler)
Definition: memory.c:296
VOID EmulatorSetA20(BOOLEAN Enabled)
Definition: memory.c:272
unsigned int BOOL
Definition: ntddk_ex.h:94
VOID FASTCALL EmulatorReadMemory(PFAST486_STATE State, ULONG Address, PVOID Buffer, ULONG Size)
Definition: memory.c:139
unsigned char BOOLEAN
static WCHAR Address[46]
Definition: ping.c:68
Definition: bufpool.h:45
BOOLEAN MemInitialize(VOID)
Definition: memory.c:720
BOOLEAN EmulatorGetA20(VOID)
Definition: memory.c:277
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
char * PBOOLEAN
Definition: retypes.h:11
#define VOID
Definition: acefi.h:82
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:359
unsigned int * PULONG
Definition: retypes.h:1
VOID FASTCALL EmulatorWriteMemory(PFAST486_STATE State, ULONG Address, PVOID Buffer, ULONG Size)
Definition: memory.c:183
#define BOOLEAN
Definition: pedump.c:73
unsigned int ULONG
Definition: retypes.h:1
IN BOOLEAN OUT PSTR Buffer
Definition: progress.h:34
BOOL MemRemoveFastMemoryHook(PVOID Address, ULONG Size)
Definition: memory.c:350
VOID FASTCALL EmulatorCopyMemory(PFAST486_STATE State, ULONG DestAddress, ULONG SrcAddress, ULONG Size)
Definition: memory.c:216