From: "Dan Bolstad" <danb@iobjects.com>
To: "ecos" <ecos-discuss@sources.redhat.com>,
Rafael RodrÃÂguez Velilla <rrv@tid.es>
Subject: RE: [ECOS] Adjusting stack sizes
Date: Thu, 30 Aug 2001 09:07:00 -0000 [thread overview]
Message-ID: <D8DFF0AFE792914996F997E68FEC3A4802BE3C@bunker.iobjects.com> (raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1676 bytes --]
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 );
Run your thread at it's highest possible stack usage, use this function
as a test diagnostic, and trim down near that. And be careful... If
you cut back the stack too far, you'll likely overflow your stack and
get very unpredictable bugs which are painful to track down.
-Dan
*
* Dan Bolstad
* Software Engineer, Interactive Objects
* danb@iobjects.com 425.289.0327
*
-----Original Message-----
From: Rafael RodrÃguez Velilla [ mailto:rrv@tid.es ]
Sent: Thursday, August 30, 2001 1:53 AM
To: ecos
Subject: Re: [ECOS] Adjusting stack sizes
"Simpkins, Andy" wrote:
> I assume that you mean whilst the thread is active? I am not sure
that that
> can be done (simply)...
>
> However if you mean before you create the thread (which I am sure you
don't)
> then the stack size is specified as part of cyg_thread_create
I don't want to create a thread that adjusts its stack size at run
time. I
want to create applications with threads that don't use too much thread
stack
space, so I'd want to know how do the others calculate the space
required by a
thread.
I have seen a member "stack_limit" and two methods
"increment_stack_limit"
and "get_stack_limit" in the Cyg_Thread class that I think that are
supposed to
help the developers adjust their stacks doing some kind of run-time
simulation... but I don't know how to use that.
--
Rafael RodrÃguez Velilla rrv@tid.es
Telefónica I+D http://www.tid.es
Telf: +34 - 91 337 4270
next reply other threads:[~2001-08-30 9:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-30 9:07 Dan Bolstad [this message]
2001-09-06 23:43 ` Jonathan Larmour
-- strict thread matches above, loose matches on Subject: below --
2001-08-30 1:57 Simpkins, Andy
2001-08-30 2:58 ` Rafael RodrÃguez Velilla
2001-08-30 1:43 Rafael RodrÃguez Velilla
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=D8DFF0AFE792914996F997E68FEC3A4802BE3C@bunker.iobjects.com \
--to=danb@iobjects.com \
--cc=ecos-discuss@sources.redhat.com \
--cc=rrv@tid.es \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).