This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Adjusting stack sizes


Dan Bolstad wrote:
> 
> It sounds like you want the functions defined in
> <cyg/kernel/test/stackmon.h>.
> 
> This function is very helpful when tuning stack sizes:
> cyg_test_dump_thread_stack_stats( char *comment, Cyg_Thread *p );

That interface is a slightly older one only used for tests (hence the
location of the header). The preferred API to use is:

#ifdef CYGFUN_KERNEL_THREADS_STACK_MEASUREMENT
cyg_uint32 cyg_thread_measure_stack_usage(cyg_handle_t thread);
#endif

Obviously enable the above config option. This version works better in that
it doesn't assume the stack is zero initialized.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]