memory - The missing address space in 64-bit Windows -


in today x86-64 processors, usable address space 48 bits long , separated 2 halves. 1 00000000`00000000 00007fff`ffffffff, 1 ffff8000`00000000 ffffffff`ffffffff.

now i'm writing program catch memory access violation. here code.

uint64 *test1 = (uint64 *) 0x0000000000000000; uint64 test2; addvectoredexceptionhandler(true,(pvectored_exception_handler)exceptionhandler); test2 = *test1; 

exceptionhandler veh exception handler. can address cannot access in exceptioninfo->exceptionrecord->exceptioninformation[1] (the second array element specifies virtual address of inaccessible data.(here)). @ case, 0, same test1.

if trying access address between 00007fff`ffffffff , ffff8000`00000000, exceptioninfo->exceptionrecord->exceptioninformation[1] -1. isn't out of expectation. interesting part is, when putted 0x00007fffffffffff in test1, got -1. didn't take long find 00007fff`fffffff8 00007fff`ffffffff return -1, should legal address in system.

can explain me please?


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -