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: Memory Map Urgent!


On Tue, 7 Dec 2004, Ruchika Singh wrote:

I had a doubt regarding memory map for threads. Where does the initialized/
uninitialized data or dynamic data associated with threads ( created using
cyg_thread_create) end up. What i mean to ask is that are there separate
rodata, bss, .data sections for threads or are they interleaved with those of
ecos sections itself.

Wouldn't quite say interleaved. Probably more in whatever order that the the corresponding .o and .a files get presented to the linker. (But don't ever rely on such an ordering, it may depend on platform / linker version etc.)


If I create a object using malloc call in a thread A, where is this object
likely to be placed. Or is it that any data associated with thread will end up
in its associated stack??

Only automatic variables declared down the call tree from the thread entry point end up on the stack.


Malloc places things between __heap1 symbol at the end of the .bss/.data segments and the end of the ram region. This is shared between threads.

You can configure eCos to have some per thread data space.



John Carter                             Phone : (64)(3) 358 6639
Tait Electronics                        Fax   : (64)(3) 359 4632
PO Box 1645 Christchurch                Email : john.carter@tait.co.nz
New Zealand

The universe is absolutely plastered with the dashed lines exactly one
space long.

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


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