[Beowulf] Stroustrup regarding multicore

Perry E. Metzger perry at piermont.com
Tue Aug 26 13:16:45 EDT 2008


"Lux, James P" <james.p.lux at jpl.nasa.gov> writes:
>> No. You are actually given guarantees about memory layout. They're not
>> phrased as such, but they're quite rigid. (This is rather different
>> from the situation with, for example, pointers, where you are
>> explicitly not guaranteed that pointer types are interchangeable.)
>
>
> Interesting...
> We have coding standards here (JPL) for flight software (derived
> from MISRA to a large part), which I will readily concede is NOT
> generally HPC computing, that assert that one cannot depend on a
> particular memory layout, unless it's explicitly defined somehow.

I'd have to see the particular coding standard to know whether or not
it was reasonably based. For example, the compiler *is* allowed to put
in padding for alignment purposes, and on some architectures this can
create interesting issues in the layout of arrays, structures and
unions.

However, one of those issues is not a lack of "true arrays" in C,
which was the claim originally given. (It was also claimed that C does
not support the passing of variable length arrays, which is not true,
and has been especially not true since C99 added explicit support for
them in the standard).

Perry
-- 
Perry E. Metzger		perry at piermont.com
_______________________________________________
Beowulf mailing list, Beowulf at beowulf.org
To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf



More information about the Beowulf mailing list