2004-10-21 05:12:02 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <windows.h>
|
|
|
|
|
|
|
|
#define SIZE (65*1024*1024)
|
|
|
|
|
|
|
|
ULONG x[SIZE / 4096];
|
|
|
|
|
|
|
|
int main()
|
2005-05-07 21:24:31 +00:00
|
|
|
{
|
2004-10-21 05:12:02 +00:00
|
|
|
int i;
|
|
|
|
PUCHAR BaseAddress;
|
2005-05-07 21:24:31 +00:00
|
|
|
|
2004-10-21 05:12:02 +00:00
|
|
|
BaseAddress = VirtualAlloc(NULL,
|
|
|
|
SIZE,
|
|
|
|
MEM_COMMIT,
|
|
|
|
PAGE_READONLY);
|
|
|
|
if (BaseAddress == NULL)
|
|
|
|
{
|
|
|
|
printf("Failed to allocate virtual memory");
|
|
|
|
return(1);
|
|
|
|
}
|
|
|
|
printf("BaseAddress %p\n", BaseAddress);
|
|
|
|
for (i = 0; i < (SIZE / 4096); i++)
|
|
|
|
{
|
|
|
|
printf("%.8x ", i*4096);
|
|
|
|
x[i] = BaseAddress[i*4096];
|
|
|
|
}
|
2005-05-07 21:24:31 +00:00
|
|
|
|
2004-10-21 05:12:02 +00:00
|
|
|
return(0);
|
|
|
|
}
|