This is the mail archive of the ecos-discuss@sourceware.cygnus.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: Standard Template Library


>>>>> "Mahendra" == Mahendra Babu P <babu@cdotb.ernet.in> writes:

    Mahendra> 	Has anybody attempted to use Standard Template Library
    Mahendra> with ECOS ? If so, please give us information on your
    Mahendra> attempts.

Not that I am aware of, but I can tell you about some of the issues
that would have to be addressed.

1) STL assumes C++ exception handling is available. Right now eCos is
   built with -fno-exceptions, to keep down code size. I am not sure
   offhand just what would be involved in getting C++ exceptions
   going.

   The same may be true of RTTI support, I do not know offhand whether
   or not STL depends on RTTI. However RTTI support is a lot simpler
   than exceptions, so this should not be a major hurdle.

2) STL pretty much assumes dynamic memory allocation. You would have
   to figure out how to map STL allocators on to the eCos dynamic
   memory allocation support. This may just work if everything ends up
   being mapped on to malloc() eventually, or more effort may be
   needed/desirable.

3) thread-safety. The normal STL implementation can run on a number of
   different thread implementations, including pthreads. You would
   probably have to add support for eCos threading somewhere.

For other parts of the C++ library, e.g. the I/O support, things get a
bit more interesting. Much/all of this can be layered on top of a C
library, but it needs to hook into the C library's stdio support in
various ways. Again I do not know all the details.

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]