From: "Stefan Sommerfeld" <sommerfeld@mikrom.de>
To: <ecos-discuss@ecos.sourceware.org>
Subject: Re: [ECOS] ISR to DSR delay?
Date: Thu, 13 Oct 2005 13:26:00 -0000 [thread overview]
Message-ID: <003801c5cff9$5daf8f00$8262fea9@nullnullsix> (raw)
In-Reply-To: <20051013130155.GB6114@lunn.ch>
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
next prev parent reply other threads:[~2005-10-13 13:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-13 12:44 Stefan Sommerfeld
2005-10-13 13:02 ` Andrew Lunn
2005-10-13 13:26 ` Stefan Sommerfeld [this message]
2005-10-13 14:01 ` Andrew Lunn
2005-10-13 13:14 ` Andrew Lunn
2005-11-01 12:29 ` Stefan Sommerfeld
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='003801c5cff9$5daf8f00$8262fea9@nullnullsix' \
--to=sommerfeld@mikrom.de \
--cc=ecos-discuss@ecos.sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).