[opus] Global stack on Cortex-M4

Timothy B. Terriberry
Wed, 18 Oct 2017 21:19:40 -0000

Thomas Daede wrote:
> NONTHREADSAFE_PSEUDOSTACK requires a working allocator. You should
> select either vararrays or alloca(). Both should work on any gcc-based

No, NONTHREADSAFE_PSEUDOSTACK is the one designed to not use alloca or
vararrays. You will need to override opus_alloc_scratch(), however. You
can simply declare a static array of size GLOBAL_STACK_SIZE bytes and
make opus_alloc_scratch() return its address. Maybe Jean-Marc knows a
less-cumbersome way to do this.