Skip to main content
edited tags
Link
Gilles 'SO- stop being evil'
  • 865.9k
  • 205
  • 1.8k
  • 2.3k
spelling and a little layout
Source Link
user unknown
  • 10.8k
  • 3
  • 37
  • 59

Raionale Rationale for making user space text segment start at 0x8048000

I read somewhere that ( atat least since Linux v. 2.6  ) all user-space code is placed at load address 0x8048000 in the virtual memory address space.

My own observations confirm this. I have done a

cat /proc/......../maps

cat /proc/......../maps 

for several processes and the very first section of a process' program text always starts at '0x8048000'.

Furthermore the C library startup code and all the other runtime goodies all seem to be mapped after this default value.

This constitutes almost 128 M of address space, not a lot considering that 0xC0000000 0xC0000000 - 0x8048000 is still almost 3G of address space for user space stuff.

So my question is why?

We are dealing with virtual addresses, interference or overlap with other programs is excluded by definition of the way VM works.

Are there some fixed/default mappings in the range 0x00000000 to 0x8048000 ?

AppartApart from the fact that the default start address falls on a page boundary, what is the rationale for having chosen this number as opposed to any other value?

Raionale for making user space text segment start at 0x8048000

I read somewhere that ( at least since Linux v. 2.6  ) all user-space code is placed at load address 0x8048000 in the virtual memory address space.

My own observations confirm this. I have done a

cat /proc/......../maps

for several processes and the very first section of a process' program text always starts at '0x8048000'.

Furthermore the C library startup code and all the other runtime goodies all seem to be mapped after this default value.

This constitutes almost 128 M of address space, not a lot considering that 0xC0000000 - 0x8048000 is still almost 3G of address space for user space stuff.

So my question is why?

We are dealing with virtual addresses, interference or overlap with other programs is excluded by definition of the way VM works.

Are there some fixed/default mappings in the range 0x00000000 to 0x8048000 ?

Appart from the fact that the default start address falls on a page boundary, what is the rationale for having chosen this number as opposed to any other value?

Rationale for making user space text segment start at 0x8048000

I read somewhere that (at least since Linux v. 2.6) all user-space code is placed at load address 0x8048000 in the virtual memory address space.

My own observations confirm this. I have done a

cat /proc/......../maps 

for several processes and the very first section of a process' program text always starts at '0x8048000'.

Furthermore the C library startup code and all the other runtime goodies all seem to be mapped after this default value.

This constitutes almost 128 M of address space, not a lot considering that 0xC0000000 - 0x8048000 is still almost 3G of address space for user space stuff.

So my question is why?

We are dealing with virtual addresses, interference or overlap with other programs is excluded by definition of the way VM works.

Are there some fixed/default mappings in the range 0x00000000 to 0x8048000 ?

Apart from the fact that the default start address falls on a page boundary, what is the rationale for having chosen this number as opposed to any other value?

Source Link
darbehdar
  • 867
  • 2
  • 8
  • 9

Raionale for making user space text segment start at 0x8048000

I read somewhere that ( at least since Linux v. 2.6 ) all user-space code is placed at load address 0x8048000 in the virtual memory address space.

My own observations confirm this. I have done a

cat /proc/......../maps

for several processes and the very first section of a process' program text always starts at '0x8048000'.

Furthermore the C library startup code and all the other runtime goodies all seem to be mapped after this default value.

This constitutes almost 128 M of address space, not a lot considering that 0xC0000000 - 0x8048000 is still almost 3G of address space for user space stuff.

So my question is why?

We are dealing with virtual addresses, interference or overlap with other programs is excluded by definition of the way VM works.

Are there some fixed/default mappings in the range 0x00000000 to 0x8048000 ?

Appart from the fact that the default start address falls on a page boundary, what is the rationale for having chosen this number as opposed to any other value?