This is the mail archive of the
ecos-discuss@sourceware.cygnus.com
mailing list for the eCos project.
Re: Standard Template Library
- To: babu at cdotb dot ernet dot in
- Subject: Re: [ECOS] Standard Template Library
- From: Bart Veer <bartv at redhat dot com>
- Date: Fri, 14 Apr 2000 12:23:56 +0100
- CC: ecos-discuss at sourceware dot cygnus dot com
- References: <Pine.OSF.4.21.0004141240110.9493-100000@jnana.cdotb.ernet.in>
- Reply-to: bartv at redhat dot com
>>>>> "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