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]

Re: Does eCos create threads in runtime dynamically?


>>>>> " " == =?gb2312?B?zfXOsA==?=  <gb2312> writes:

     > This is a multi-part message in MIME format.
     > ------=_NextPart_000_0027_01C01D62.05147080
     > Content-Type: text/plain;
     > 	charset="gb2312"
     > Content-Transfer-Encoding: quoted-printable

     > It's  said that eCos is targeted at static system in eCos whitepaper.
     > But I notice eCos improve it's dynamic memory manager in kernel.Is it
     > means a thread can be created dynamically by another thread at runtime ?
     > someone explain it for me !
     > thanks

     > ------=_NextPart_000_0027_01C01D62.05147080
     > Content-Type: text/html;
     > 	charset="gb2312"
     > Content-Transfer-Encoding: quoted-printable

     <snip>

First, please configure your email settings to use plain text only
when sending to mailing lists such as ecos-discuss. Not everybody uses
MIME-aware mail readers.

The preferred approach in eCos is to use static allocation whenever
possible. This avoids problems such as memory leaks, running out of
memory at inconvenient times, non-determinism caused by memory
fragmentation, and so on. If you can avoid dynamic allocation
completely then you can eliminate the need for malloc() etc., saving
on both code and data size.

However, there are some applications for which a completely static
approach is not sufficient. Hence eCos does provide facilities such as
malloc(), and it does allow threads etc. to be created and destroyed
at run-time.

Bart Veer // eCos net maintainer

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