From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Steve Deiters <SteveDeiters@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Determining stack usage?
Date: Thu, 08 Jul 2010 01:12:25 +0200 [thread overview]
Message-ID: <4C3509D9.40806@domain.hid> (raw)
In-Reply-To: <181804936ABC2349BE503168465576460F3855E1@domain.hid>
Steve Deiters wrote:
> With the recent questions about the stack size going around I had a
> somewhat related question. Does Xenomai (or Linux for that matter)
> provide any mechanism to determine stack usage? I know of other RTOSes
> that used a mechanism that basically prefills the stack with a guard
> word upon task creation, and then calculates the stack usage based on
> the first non guard word it encounters from the bottom of the stack. I
> didn't know if Xenomai provided this or anything similar.
No. The only thing provided is an unwritable page below the stack, so
that in case of stack overflow, a segmentation fault happens on machines
with an MMU. If you look at the stack pointer at the time of the fault,
you can see that you got a stack overflow. There is no silent corruption
of a neighbor stack.
--
Gilles.
prev parent reply other threads:[~2010-07-07 23:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-07 22:51 [Xenomai-help] Determining stack usage? Steve Deiters
2010-07-07 23:12 ` Gilles Chanteperdrix [this message]
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=4C3509D9.40806@domain.hid \
--to=gilles.chanteperdrix@xenomai.org \
--cc=SteveDeiters@domain.hid \
--cc=xenomai@xenomai.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.