Hello
Please explain how pointer size affects code segment size. (Redirections to
references are welcome.)
Thank you.
Hello
Please explain how pointer size affects code segment size. (Redirections to
references are welcome.)
Thank you.
You’re reading that 8086/80286 book aren’t you.
But forgetting the abomination that x86 segment registers are, the width of pointers affects the size of the data area that is accessible to a program. So a 32-bit pointer can address up to 4GB of memory.
PS: That’s not the same thing as what the OS can use. With hardware extensions like PAE, the OS can manage a much larger arena of memory. This is per-program.
ken yap wrote:
>
> You’re reading that 8086/80286 book aren’t you.
>
> But forgetting the abomination that x86 segment registers are, the
> width of pointers affects the size of the data area that is accessible
> to a program. So a 32-bit pointer can address up to 4GB of memory.
>
> PS: That’s not the same thing as what the OS can use. With hardware
> extensions like PAE, the OS can manage a much larger arena of memory.
> This is per-program.
>
Thank you for the clarification. I am reading the book Deep C Secrets by
Peter van Linden.