Re: is not 0x8048000 too wasteful?--about virtual address layout



Sean wrote:
Linux running on x86, the virtual memory looks as following---the
address under 0x8048000 is totally wasted. ...

There is folklore that 0x08048000 once was STACK_TOP (that is, the stack
grew downwards from near 0x08048000 towards 0) on a port of *NIX to i386
that was promulgated by a group from Santa Cruz, California. This was
when 128MB of RAM was expensive, and 4GB of RAM was unthinkable.

Today, addresses from 0x00111000 to 0x08046fff often are occupied
by shared libraries instantiated at random addresses [the better
to deter malware], selected either by the kernel or by prelink.
Those who fret about contiguous address space and large arrays
often get little sympathy because x86_64 machines are so inexpensive
in the "first world." In any case, if it really matters then the
address layout can be controlled by a custom linker script during
the building the application. Various runtime hacks are available,
too. See http://BitWagon.com/tub/tub.html for one of them.

--
.



Relevant Pages

  • ColdFire M5271 use 52Kb SRAM for C-stack to test DRAM at OS boot ?
    ... allocate C-stack there to test DRAM at the boot time? ... allocating stack on DRAM and jumping over it during DRAM test - anybody ... I need to run the RAM test before the bootrom copies itself into RAM, ... At this point the system is still executing instructions out of ROM. ...
    (comp.arch.embedded)
  • ColdFire M5271 Initialize 52Kb SRAM & allocate C-stack there to test DRAM at boot ?
    ... allocate C-stack there to test DRAM at the boot time? ... allocating stack on DRAM and jumping over it during DRAM test - anybody ... I need to run the RAM test before the bootrom copies itself into RAM, ... At this point the system is still executing instructions out of ROM. ...
    (comp.realtime)
  • Re: IAR compiler & MSP430 problem
    ... the linker isn't telling you when you have run our of RAM. ... which produced a prediction of stack use ... chips have different memory resources. ... // segment address range usage ...
    (comp.arch.embedded)
  • Re: 8051 memory interfacing questions
    ... >> it comes to interfacing memory to 8051. ... The Philips Mx range have 192Kb on chip flash ... For stack, see later. ... of RAM. ...
    (comp.arch.embedded)
  • Re: Really tiny microcontrollers
    ... your compiler should allow you to store them as uint16_t. ... If you have 4K RAM, then a linked list is not a natural solution. ... Although the size of stack entries cannot be lowered, ... STRH R0, ...
    (comp.arch.embedded)