[Speex-dev] alignment and static variable size question

Jean-Marc Valin jean-marc.valin at usherbrooke.ca
Wed Sep 12 15:56:43 PDT 2007


> a) verify that my sizes are correct or if they are too small

Just pad with 0xdeadbeef values and you'll see.

> b) Tell me if anything in the speex library is supposed to be aligned
> in any way in memory.  I see there is an ALIGN define in one of the
> files for the stack but I am not entirely sure what that means (i'm
> inexperienced in C).

Well, ALIGN means align the memory. At the very least, 16-bit values
must be 16-bit aligned and 32-bit values must be 32-bit aligned. For
some architecture-specific optimisations (don't think there are any yet
on TI DSPs), you may need extra alignment (e.g. SSE instructions require
16-byte alignment).

	Jean-Marc


More information about the Speex-dev mailing list