This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RE: Thread error with large buffer
- To: "'Gary Thomas'" <gthomas at redhat dot com>
- Subject: RE: [ECOS] Thread error with large buffer
- From: "Trenton D. Adams" <tadams at extremeeng dot com>
- Date: Fri, 20 Jul 2001 09:18:55 -0600
- Cc: "'eCos mailing list'" <ecos-discuss at sources dot redhat dot com>
- Organization: Extreme Engineering
>
> On 20-Jul-2001 Trenton D. Adams wrote:
> > > why not just make it static? also there are routines you can
use
> to
> > > check the stack size and usage for a given thread. also you
can
> > adjust
> > > the stack size for main (the default in a kernel i just
glanced at
> > is
> > > 8k). also you can enable stack overflow checking.
> > >
> > > -Dan
> > >
> >
> > This is a TEST program, I don't think it's really necessary to
worry
> > about silly things like where stuff resides in memory, whether
it's on
> > the stack or on the heap.
>
> Ah, but this is an embedded system, where you _do_ have to worry
about
> such things as "is my stack big enough for the buffer I just
created?",
> even for "test" programs.
>
Yes, stack size does matter, but caring whether it's on the stack or the
heap is inconsequential.