[CELT-dev] GLOBAL_STACK_SIZE

Mike Hooper mihooper at bellsouth.net
Mon Jun 7 13:10:11 PDT 2010


I am having trouble understanding the stack allocation scheme when using a
C55xx device. From what I can tell, the GLOBAL_STACK_SIZE is set in arch.h
to 100,000 bytes (when using FIXED_POINT), which is then used in the
ALLOC_STACK macro found in stack_alloc.h. This macro seems to say, if
global_stack==0, then call celt_alloc_scratch, found in os_support.h, which
in turn attempts to allocate (using calloc) 100,000 bytes for the global
stack. However, the *celt_alloc_scratch expects an "int", which in C55x
lingo is 16bits (+/-32768). When debugging this macro, a value of -31072 is
passed to *celt_alloc_scratch, which allocates no stack, causing failure of
celt_mode_create(). What am I missing? Can you provide some insight on how
the stack should be allocated? How large should it be? 100,000 bytes seems a
bit large to me.

 

Thx

MikeH

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/opus/attachments/20100607/658a34c0/attachment-0002.htm 


More information about the celt-dev mailing list