This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Adjusting stack sizes
- To: Dan Bolstad <danb at iobjects dot com>
- Subject: Re: [ECOS] Adjusting stack sizes
- From: Jonathan Larmour <jlarmour at redhat dot com>
- Date: Fri, 07 Sep 2001 07:43:51 +0100
- Cc: ecos <ecos-discuss at sources dot redhat dot com>,"Rafael Rodríguez Velilla" <rrv at tid dot es>
- References: <D8DFF0AFE792914996F997E68FEC3A4802BE3C@bunker.iobjects.com>
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