This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCC Logical Addres Forming


Doron Bleiberg wrote:
Hi,
I'm studying memory management on linux. All the articles I have read
starts from a given logical address that is later translated into
linear address using the segmentation technique. I have a hard time to
understand how this logical address is formed. How segments are
created by the compiler such that the "magic" of address translation
will work at run time?
Who forms the logical address? How does it formed? When is it being formed?
Can you please direct me to some material on this subject ?

this is not a compiler issue.


'logical addresses' are those that your program sees -- if you use a
debugger on your program, the addresses printed by the debugger are
logical addresses (aka 'virtual addresses').

'physical addresses' are those seen by the memory hardware.  If you
stick a logic analyser on the address bus of the system, you'll see
physical addresses.

How logical addresses map to physical addresses is part of the system's
MMU and is outside of the compiler.  The linker might have to place
particular pieces of your program in particular ranges of logical
addresses, but again that's a system configuration issue.

nathan
--
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]