Re: [Jack-Devel] packed data structures in jack2

PrevNext  Index
DateThu, 19 Jul 2012 21:20:06 +0300
From Nedko Arnaudov <[hidden] at arnaudov dot name>
ToBasil Nutmeg <[hidden] at li95-58 dot members dot linode dot com>
Cc[hidden] at lists dot jackaudio dot org
In-Reply-ToBasil Nutmeg Re: [Jack-Devel] packed data structures in jack2
[In plain C] the proper solution for the problem is to use appropriate
aritifical padding members in structs and eventually enforce packing as
well. The padding must be such that pointer used to access a give data
type must be aligned to that size (this is in the C standard). RISC
processors tend to generate exception for this, CISC only executes
slower. Some operating systems catch the [hardware] unaligned access
exception and do the byte-by-byte copy and some of them even generate a
log line.

The solution should be appropriate for C++ as well but I'll leave more
C++ affiliated ones to do such claims.

-- 
Nedko Arnaudov <GnuPG KeyID: 5D1B58ED>
PrevNext  Index

1342722001.23467_0.ltw:2,a <87ipdjpq95.fsf at arnaudov dot name>