From: Enrico Weigelt <weigelt@metux.de>
To: gcc-help@gcc.gnu.org
Subject: Re: C++ and garbage collection
Date: Sat, 05 Feb 2011 12:51:00 -0000 [thread overview]
Message-ID: <20110205123726.GA29367@nibiru.local> (raw)
In-Reply-To: <8762szv979.fsf@mid.deneb.enyo.de>
* Florian Weimer <fw@deneb.enyo.de> wrote:
Hi,
> > My idea is to add some mark+sweep gc (boem-gc ?) and remove (or
> > somehow disable) all delete operations. Does that work safely,
> > or do I have to cope with certain nasty side effects ?
>
> Performance might change.
Okay, it might block a little time when the GC runs, but as it's
a menu-driven application, this won't matter much, IMHO.
> Object lifetimes are no longer deterministic, and destructors will not
> be called. This can be a significant issue.
Yes, for examples having to close fd's before unmounting filesystems.
But these places are quite few, already identified and mostly
encapsulated, so I can easily add an direct close (independent of
object lifetimes) instead of the delete operations.
> There are a few cases when the Boehm-Dehmers-Weiser collector won't
> work, for instance if you have got custom memory allocators or use
> some pointer encoding schemes.
That's not the case in my app. Purely C++, plus some additional
libraries which I could review quite easily.
cu
--
----------------------------------------------------------------------
Enrico Weigelt, metux IT service -- http://www.metux.de/
phone: +49 36207 519931 email: weigelt@metux.de
mobile: +49 151 27565287 icq: 210169427 skype: nekrad666
----------------------------------------------------------------------
Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme
----------------------------------------------------------------------
next prev parent reply other threads:[~2011-02-05 12:47 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-04 20:25 Enrico Weigelt
2011-02-04 22:13 ` Florian Weimer
2011-02-05 12:51 ` Enrico Weigelt [this message]
2011-02-05 0:03 ` Jonathan Wakely
2011-02-05 4:25 ` Lawrence Crowl
2011-02-05 14:37 ` Enrico Weigelt
2011-02-05 14:43 ` Jonathan Wakely
2011-02-05 14:56 ` Enrico Weigelt
2011-02-06 19:29 ` Florian Weimer
2011-02-07 6:41 ` Enrico Weigelt
2011-02-07 18:50 ` Florian Weimer
2011-02-12 20:55 ` Enrico Weigelt
2011-02-06 23:01 ` Jonathan Wakely
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=20110205123726.GA29367@nibiru.local \
--to=weigelt@metux.de \
--cc=gcc-help@gcc.gnu.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).