Hi all,
I tried to map the occupied Memory Addresses of all currently working programs
with a De-bugger(MAP32 command in SICE,ofCourse).Interestingly, more than one program has the same
Seg:Offset Addresses as 0167:401000.
Where our common logic on W32 prgms says ...
'Two programs can never be on a same Address space'!.
ImageBase in PE-format also, described as....
PE loader may not load the file at that address, if some other module already occupied that address range.
Then how can the Above happen anyway. ?
:confused:
I tried to map the occupied Memory Addresses of all currently working programs
with a De-bugger(MAP32 command in SICE,ofCourse).Interestingly, more than one program has the same
Seg:Offset Addresses as 0167:401000.
Where our common logic on W32 prgms says ...
'Two programs can never be on a same Address space'!.
ImageBase in PE-format also, described as....
PE loader may not load the file at that address, if some other module already occupied that address range.
Then how can the Above happen anyway. ?
:confused:
The wonderful IA32 feature called 'paging' allows this - the same linear address is mapped to different physical addresses for each process. This allows every win32 app to start at 0x400000 (the second page directory entry, btw). This allows apps to run without relocations, pretty handy.
Thus, the the "other module" clashing can only really happen with DLLs - but most DLLs contain relocations, so it's not really a problem there, either - it will just get a different base address than the preferred, and be relocated. (Note that it pays off to choose your DLL base addresses wisely - and perhaps use the rebase tool from the PlatformSDK to ensure all DLLs have unique loading addresses, to speed stuff up).
Thus, the the "other module" clashing can only really happen with DLLs - but most DLLs contain relocations, so it's not really a problem there, either - it will just get a different base address than the preferred, and be relocated. (Note that it pays off to choose your DLL base addresses wisely - and perhaps use the rebase tool from the PlatformSDK to ensure all DLLs have unique loading addresses, to speed stuff up).
Well...I had studied in the Classes about paging and all.
Oh..This is where it is used actually...
Thanks f0dder
Oh..This is where it is used actually...
Thanks f0dder