#include <Windows.h>
#include <iostream>
using namespace std;
int main()
{
thread_local int i;
MEMORY_BASIC_INFORMATION mbi;
if( !VirtualQueryEx( GetCurrentProcess(), &i, &mbi, sizeof mbi ) )
return EXIT_FAILURE;
cout << "allocation base: " << (void *)mbi.AllocationBase << endl;
cout << "region base: " << (void *)mbi.BaseAddress << endl;
cout << "&i: " << (void *)&i << endl;
cout << "region size: " << (double)mbi.RegionSize / 0x1.0p12;
cout << " pages" << endl;
}
Where does my thread-local data live ?
- From
- Bonita Montero <Boni…@gmail.com>
- Organization
- A noiseless patient Spider
- Message-ID
- <11da…@raubtier-asyl.eternal-september.org>
- Date
- Newsgroups
- comp.lang.c++, de.comp.lang.c