C++ Logo

sg12

Advanced search

Re: [ub] Justification for < not being a total order on pointers?

From: Roger Orr <rogero_at_[hidden]>
Date: Sat, 19 Oct 2013 12:58:44 +0100
Nevin Liber wrote:

> But, even if segmented architectures, unlikely though it is, do come
> back

It might be worth remembering that the x86 and x64 architectures *are*
segmented.

However the operating system does a good job of hiding this from the
application programmer who (normally) treats the address space as flat - the
user-mode segment registers (CS, DS) are set up with a base address of zero.

However, even in application space, Windows for example uses the fs register
to point to the current thread environment block.
(It is a minor nit that you can't access this address using fs from C++.)

I would hesitate to make decisions now that would preclude future use cases
for segment registers.
[ For example, OTTOMH, mapping to GPU memory, or managing NUMA extensions ?
]

Regards,
Roger.

Received on 2013-10-19 14:05:24