sizeof a struct

V

Villy Kruse

While the solutions on that page are (for obvious reasons) partly
system-specific, in particular the attribute-packed one, its explanation
of the problem is good, IMO.

Just need to note that some processors don't tolerate unaligned access
at all. You get a program crash rather than some performance penalty.

Of course, djgpp is limited to Intel x86 only so this doesn't apply.

Villy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top