Re: about the address of the variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks for your help.
I think I've got it.
From the programmer's view, we can just see the logical address only.

The picture
"logical address--->(segmentation) --->linear address--->(paging) --->physical address"
 was processed by kernel and hardware, so user mode programmer  does not care it. He or she just care the logical address, it's enough.

Please do corret me if I'm wrong. Thanks.

On Mon, Jun 23, 2008 at 8:03 PM, Thomas Petazzoni <thomas.petazzoni@xxxxxxxxxxxxxxxxxx> wrote:
Hi,

Le Mon, 23 Jun 2008 06:45:47 -0500,
"Mayank Kaushik" <mayank.utexas@xxxxxxxxx> a écrit :

> Under x86, we have both segmentation and paging. Here's a rough flow:
>
> Logical Address (<Segment>:<Offset>) ---> (segmentation)---> Linear
> address ---> (paging)---> Physical Address.

In Linux, all segments have a size of 4 GB (on x86), which
means that mostly the convertion between "logical" and "linear" address
doesn't do anything.

The problem with all these terms "logical", "linear" and "virtual" is
that everybody uses them with a slightly different meaning.

To make it simple, in Linux you have two different type of addresses:

 * physical, from 0 to the size of your physical RAM (I left out the
  peripherals mapped in the physical address space) ;

 * virtual, from 0 to 2^32 bits on 32 bits architectures.

The stack address that you see is a virtual address, as are all the
addresses that you can see in /proc/[pid]/maps.

Sincerly,

Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers and embedded Linux development,
consulting, training and support.
http://free-electrons.com



--
Best Regards.

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux