Explain a line from a text

Hello

I was reading a text about C. I found this line withut sufficient
explanation or may be thats what I think. Help me with it please.

“It is difficult and error-prone to compile the interaction between array
and struct sizes, pointer sizes, memory models, and 80x86 hardware
operating modes.”

Thank you.

“It is difficult and error-prone to compile the interaction between array
and struct sizes, pointer sizes, memory models, and 80x86 hardware
operating modes.”

I think means: The 80x86 architecture has so many variations on memory models and choices for pointer sizes, and I’m too lazy to tabulate all of them. :wink:

Actually I don’t blame the author. In the bad old days, when 286s were the hottest things around, at compilation time, you could choose between many different memory models: tiny, small, medium, compact, large, huge. Each of these had a different combination of pointer size, address space, segment register, and so forth. It hurts my brain to even drag up these terms. If you can get hold of a Turbo-C manual, probably from the same pile where you seem to have picked up this C book, the meanings of these memory models will be explained.

I would just not bother because starting with the 386s, the first x86 CPUs that can run Linux, the CPU is set to use a flat memory space and pointers are 32 bits. So you don’t need to know all that stuff at all.

ken yap wrote:
> I think means: The 80x86 architecture has so many variations on memory
> models and choices for pointer sizes, and I’m too lazy to tabulate all
> of them. :wink:
>
> Actually I don’t blame the author. In the bad old days, when 286s were
> the hottest things around, at compilation time, you could choose between
> many different memory models: tiny, small, medium, compact, large, huge.
> Each of these had a different combination of pointer size, address
> space, segment register, and so forth. It hurts my brain to even drag up
> these terms. If you can get hold of a Turbo-C manual, probably from the
> same pile where you seem to have picked up this C book, the meanings of
> these memory models will be explained.
>
> I would just not bother because starting with the 386s, the first x86
> CPUs that can run Linux, the CPU is set to use a flat memory space and
> pointers are 32 bits. So you don’t need to know all that stuff at all.
>
I agree it is an old one but the book has been enlightening so far. Thank
you for the clarification and yes the book does include these memory
models.