int main()
{
-a-a-a-athread_local int i;
-a-a-a-aMEMORY_BASIC_INFORMATION mbi;
-a-a-a-aif( !VirtualQueryEx( GetCurrentProcess(), &i, &mbi, sizeof mbi ) )
-a-a-a-a-a-a-a return EXIT_FAILURE;
-a-a-a-acout << "allocation base: " << (void *)mbi.AllocationBase << endl;
-a-a-a-acout << "region base:-a-a-a-a " << (void *)mbi.BaseAddress << endl;
-a-a-a-acout << "&i:-a-a-a-a-a-a-a-a-a-a-a-a-a " << (void *)&i << endl;
-a-a-a-acout << "region size:-a-a-a-a " << (double)mbi.RegionSize / 0x1.0p12;
-a-a-a-acout << " pages" << endl;
}
#include <Windows.h>
#include <iostream>
using namespace std;
int main()
{
-a-a-a-athread_local int i;
-a-a-a-aMEMORY_BASIC_INFORMATION mbi;
-a-a-a-aif( !VirtualQueryEx( GetCurrentProcess(), &i, &mbi, sizeof mbi ) )
-a-a-a-a-a-a-a return EXIT_FAILURE;
-a-a-a-acout << "allocation base: " << (void *)mbi.AllocationBase << endl;
-a-a-a-acout << "region base:-a-a-a-a " << (void *)mbi.BaseAddress << endl;
-a-a-a-acout << "&i:-a-a-a-a-a-a-a-a-a-a-a-a-a " << (void *)&i << endl;
-a-a-a-acout << "region size:-a-a-a-a " << (double)mbi.RegionSize / 0x1.0p12;
-a-a-a-acout << " pages" << endl;
}
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 76 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 54:30:58 |
| Calls: | 1,265 |
| Calls today: | 1 |
| Files: | 1,362 |
| D/L today: |
3 files (2,684K bytes) |
| Messages: | 285,563 |