On 11 Oct 2012, at 15:23, dhkblas...@zeelandnet.nl wrote:
Thanks, I think everything is clear now. My plan now is to
respect default padding and write records in one go to disk. The
padding
value will be written to the file header so the records can be read
back
one variable at a time when padding differs, otherwise they will be
read
back in one go again. This will sure come at a cost, but only if the
file is shared between different ABI's (as is the case when sharing
between different endianess). The result will be that the data
structures will be at default padding internally allways making
optimal
use of the CPU.
So is there a way to get the padding value at runtime?
No. You really should write the fields one by one. Yes, it's slower.
That's the cost of portability. You can always optimize by first
writing them to a buffer and then writing the buffer in one go.
Jonas
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal