ReactOS
0.4.16-dev-814-g656a5dc
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
Functions
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
Variables
_
c
d
e
f
g
h
i
l
m
n
o
p
s
t
u
x
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
x
Enumerations
_
a
b
c
d
f
i
l
m
o
p
s
t
w
x
Enumerator
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
w
x
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Related Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
x
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Examples
vmtest.c
Go to the documentation of this file.
1
#include <stdio.h>
2
#include <windows.h>
3
4
int
main
()
5
{
6
PBYTE
Base
;
7
PVOID
Ret;
8
9
Base
=
VirtualAlloc
(
NULL
,
10
1048576,
11
MEM_RESERVE
,
12
PAGE_READWRITE
);
13
if
(
Base
==
NULL
)
14
{
15
printf
(
"VirtualAlloc failed 1\n"
);
16
}
17
18
Ret =
VirtualAlloc
(
Base
+ 4096,
19
4096,
20
MEM_COMMIT
,
21
PAGE_READWRITE
);
22
if
(Ret ==
NULL
)
23
{
24
printf
(
"VirtualAlloc failed 2\n"
);
25
}
26
27
Ret =
VirtualAlloc
(
Base
+ 12288,
28
4096,
29
MEM_COMMIT
,
30
PAGE_READWRITE
);
31
if
(Ret ==
NULL
)
32
{
33
printf
(
"VirtualAlloc failed 3\n"
);
34
}
35
36
Ret =
VirtualAlloc
(
Base
+ 20480,
37
4096,
38
MEM_COMMIT
,
39
PAGE_READWRITE
);
40
if
(Ret ==
NULL
)
41
{
42
printf
(
"VirtualAlloc failed 4\n"
);
43
}
44
45
Ret =
VirtualAlloc
(
Base
+ 4096,
46
28672,
47
MEM_RESERVE
,
48
PAGE_READWRITE
);
49
if
(Ret ==
NULL
)
50
{
51
printf
(
"VirtualAlloc failed 5\n"
);
52
}
53
return
0;
54
}
55
NULL
#define NULL
Definition:
types.h:112
printf
#define printf
Definition:
freeldr.h:97
void
Definition:
nsiface.idl:2307
Base
_In_opt_ ULONG Base
Definition:
rtlfuncs.h:2463
PAGE_READWRITE
#define PAGE_READWRITE
Definition:
nt_native.h:1304
MEM_RESERVE
#define MEM_RESERVE
Definition:
nt_native.h:1314
MEM_COMMIT
#define MEM_COMMIT
Definition:
nt_native.h:1313
PBYTE
BYTE * PBYTE
Definition:
pedump.c:66
main
int main()
Definition:
vmtest.c:4
VirtualAlloc
LPVOID NTAPI VirtualAlloc(IN LPVOID lpAddress, IN SIZE_T dwSize, IN DWORD flAllocationType, IN DWORD flProtect)
Definition:
virtmem.c:65
modules
rostests
tests
vmtest
vmtest.c
Generated on Thu Mar 13 2025 06:09:04 for ReactOS by
1.9.6