Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    I don't understand segmentation

    So I'm reading about segmentation for x86, but I'm confused. If I understand correctly, each process is allowed 3 GB of total memory -- including code, stack, and heap: -- When Linux Runs Out of Memory

    On the other hand, it sounds like Linux also uses _USER_CS and _USER_DS segment descriptors:

    Section 2.3.* Segmentation in Linux

    That makes it sound like the code and data segments *each* have 2^32 bytes of memory. For example:

    "As an example, when the kernel invokes a function, it executes a call assembly language instruction specifying just the Offset component of its logical address; the Segment Selector is implicitly selected as the one referred to by the cs register."

    Why should it need to use a segment selector if the code resides in the same 32-bit address space as the data?


  2. #2
    Linux Enthusiast gerard4143's Avatar
    Join Date
    Dec 2007
    Canada, Prince Edward Island

    try these resorces

    Welcome to the forums!

    I personally think these books on the kernel are good:

    O'Reilly Media | Understanding the Linux Kernel

    O'Reilly Media | Linux Kernel in a Nutshell

    Also, look here for additional kernel information:

    The Linux Kernel: The Book

    Have fun with Linux!

    New Users: * FAQ *

    Note O'Reilly Media | Understanding the Linux Kernel has a section on linux segmentation
    that may shed some light on your question...Gerard

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts