On 10 Oct 2012, at 14:31, dhkblas...@zeelandnet.nl wrote:

Jonas and Sven... Endianess is indeed an issue I will be handling. It's my understanding now that by storing data in a packed record I will have
the same behaviour (when it comes to aligning data in memory) over all
platforms and architectures. Same applies to packed objects. However
when objects have methods, does that change memory alignment (compared
to different architectures)? Is there any impact when I start using
object inheritance?

You should never write objects containing VMTs to disk as a whole, that will only lead to trouble. Inheritance does not introduce VMTs in objects, but virtual methods, constructors and destructors do.

One more
question, when using packed records, is there anything to say about
performance? Are there some tests anywhere that show how the performance
is impacted?


It will depend on the target platform, the order of the fields and types of the fields. It is impossible to say in general what the impact will be. It can be very large or non-existent.


Jonas
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to