This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: problem with memory allcoation
- From: Andrew Lunn <andrew dot lunn at ascom dot ch>
- To: Mayank Sharma <mayanks at mindtree dot com>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Tue, 6 Aug 2002 12:00:37 +0200
- Subject: Re: [ECOS] problem with memory allcoation
- References: <E125980C421DFD4DA0B80D55DB1EDA58BC5CC4@mtv01ex01.mindtree.com>
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];
> > cyg_mempool_var_create(mem, 4096, &(rtosPool.memHandle), &memobj);
This looks OK.
>
> Then i start a thread (allocate the stack memory from the above
> pool). In the thread i am allocating memory to a variable.
How do you allocate the memory?
We need more details. My guess is that your stack is on top of *a.
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