mirror of
https://github.com/reactos/reactos.git
synced 2024-11-09 16:20:37 +00:00
bfc3948cfe
modified tests/polytest/polytest.cpp Use %ld to print LONGs, not %d modified tests/vmtest/vmtest.c Don't do pointer arithmetics on PVOID Everything else Compile winetests with __ROS_LONG64__ svn path=/trunk/; revision=38873
55 lines
930 B
C
55 lines
930 B
C
#include <stdio.h>
|
|
#include <windows.h>
|
|
|
|
int main()
|
|
{
|
|
PBYTE Base;
|
|
PVOID Ret;
|
|
|
|
Base = VirtualAlloc(NULL,
|
|
1048576,
|
|
MEM_RESERVE,
|
|
PAGE_READWRITE);
|
|
if (Base == NULL)
|
|
{
|
|
printf("VirtualAlloc failed 1\n");
|
|
}
|
|
|
|
Ret = VirtualAlloc(Base + 4096,
|
|
4096,
|
|
MEM_COMMIT,
|
|
PAGE_READWRITE);
|
|
if (Ret == NULL)
|
|
{
|
|
printf("VirtualAlloc failed 2\n");
|
|
}
|
|
|
|
Ret = VirtualAlloc(Base + 12288,
|
|
4096,
|
|
MEM_COMMIT,
|
|
PAGE_READWRITE);
|
|
if (Ret == NULL)
|
|
{
|
|
printf("VirtualAlloc failed 3\n");
|
|
}
|
|
|
|
Ret = VirtualAlloc(Base + 20480,
|
|
4096,
|
|
MEM_COMMIT,
|
|
PAGE_READWRITE);
|
|
if (Ret == NULL)
|
|
{
|
|
printf("VirtualAlloc failed 4\n");
|
|
}
|
|
|
|
Ret = VirtualAlloc(Base + 4096,
|
|
28672,
|
|
MEM_RESERVE,
|
|
PAGE_READWRITE);
|
|
if (Ret == NULL)
|
|
{
|
|
printf("VirtualAlloc failed 5\n");
|
|
}
|
|
return 0;
|
|
}
|
|
|