This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RE: problem with memory allcoation
- From: "Mayank Sharma" <mayanks at mindtree dot com>
- To: "Jani Monoses" <jani at iv dot ro>,"Andrew Lunn" <andrew dot lunn at ascom dot ch>
- Cc: <ecos-discuss at sources dot redhat dot com>
- Date: Tue, 6 Aug 2002 15:53:19 +0530
- Subject: RE: [ECOS] problem with memory allcoation
> 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.
yes they were local, but they were static, so they could'nt have been on the
stack, anyway even after making them global its not working.
>There could be something going on with alignment. When you allocate
>the stack memory, do you align the address before passing it to
>cyg_thread_create?
from gdb it looks like the stack is word alligned (word = 4 bytes) resultant
memory allocation are divisible by 4.
Mayank
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss