[Freeswitch-dev] Freeswitch on ARM, Memory alignment issues

M D nospametor at gmail.com
Fri Jan 28 18:47:55 MSK 2011

Dear Michael,

On Tue, Jan 18, 2011 at 3:40 PM, Michael Jerris <mike at jerris.com> wrote:
> On Jan 18, 2011, at 2:42 PM, M D wrote:
>> On Tue, 18 Jan 2011 12:54:53 -0500
>> Michael Jerris <mike at jerris.com> wrote:
>> In general, should I conclude that this issue has not been encountered
>> before?
> This has certainly been encountered before, on different platforms, including arm.  I suspect this is a toolchain issue more than anything in this case as we have worked on arm for quite some time.

I have done some further testing and it appears that the issue is not
a toolchain issue. It is true that some toolchains seem to exacerbate
the issue, but
even with gcc-4.4.5 some memory alignment problems seem to be still there.

The linux kernel has an alignment trap on ARM cpus. It is possible to activate
alignment fix-ups at the kernel level by executing
echo 2 > /proc/cpu/alignment

Restarting freeswitch after the alignment trap is active shows
cat /proc/cpu/alignment
User:		25068
System:		1
Skipped:	0
Half:		28
Word:		0
DWord:		25041
Multi:		0
User faults:	2 (fixup)

My tests indicate that majority of the alignment traps are triggered from
freeswitch code.

I would really appreciate if anyone can provide any information on
successful builds on ARM. Information regarding the build system used
would be invaluable in isolating the cause.

The page at http://lecs.cs.ucla.edu/wiki/index.php/XScale_alignment has
some general details regarding memory alignment on ARM.


More information about the FreeSWITCH-dev mailing list