[ECOS] ISR to DSR delay?
Stefan Sommerfeld
sommerfeld@mikrom.de
Thu Oct 13 13:26:00 GMT 2005
Hi,
> On Thu, Oct 13, 2005 at 02:42:58PM +0200, Stefan Sommerfeld wrote:
>> BTW: Why is "c++ empty delete function" a default option? I took me a
>> day
>> to find out why my system consumes a lot memory.
>
> Its a philisophical thing.
>
> Small footprint embedded systems, which is what eCos is targeted to,
> tend to use static allocated memory. That way they know they have
> enough memory either at compile time, or just after the system has
> started running when it allocates all the memory it needs for the rest
> of its life. This also makes the code simpler and smaller. You don't
> need to worry about running out of memory if you survive the startup
> phase. It is not normal to free memory since objects live until the
> system crashes/reboots. In such systems delete() is just a waste of
> space, but the linker is unlikely to be able to throw it away. So an
> empty implementation is used.
Of course, i agree it's an important function for embedded system, but i
would suggest that it's not by default enabled.
> Now i guess you are not using eCos for what its primarily targeted
> to. If you are using C++ with dynamically allocated objects you are
> probably on a big fat footprint embedded system.
I'm using eCos as a RTOS ... XScale 520MHz with 64MB RAM :)
>
> What i suppose we could do to help people in your situation is that if
> INFRA_DEBUG is enabled add a counter to count the number of times
> delete() is called. If it exceeds 100 throw an assert. When the assert
> goes off and you start investigating it, it will quickly become
> obvious what you need to do....
That would be an option ....
Bye...
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
More information about the Ecos-discuss
mailing list