This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]