On 11/14/2026 10:35 AM, Bonita Montero wrote:
> #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; > }
iirc, in the .tdata or .tss. But that might be for ELF. For Windows, damn... iirc, in the TIB? https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-tlsalloc