This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: problem with memory allcoation
On Tue, Aug 06, 2002 at 01:17:21PM +0000, Jani Monoses wrote:
> is the mem array a local variable of a function?then make it global...
> if the 3 lines of code are pasted from the sources than it looks like that.
>
>
> > On Tue, Aug 06, 2002 at 03:21:49PM +0530, Mayank Sharma wrote:
> > > Hi Listers,
> > > I am facing a peculiar problem with respent to allocating memory. I
> > > am creating a memory pool using the following code
> > >
> > > > static cyg_mempool_var memobj;
> > > > static cyg_uint8 mem[4096];
_static_
Even when static variables are declared inside function code, they
never go on the stack. This is safe.
Andrew
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss