Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > garbage collector

Reply
Thread Tools

garbage collector

 
 
Ian Upright
Guest
Posts: n/a
 
      05-24-2006
Hi, I'm looking for a good garbage collector for C++. However, I have some
constraints:

In my particular application, memory fragmentation could become a real
problem. Thereby, the garbage collector would need to have some support for
being able to move objects around, and would preferably support generational
and some form of copying garbage collection. This implies that the objects
may need to be using some kind of smart pointers to manage this properly.

Other things that are important would be:
* delivers commercial grade high performance
(eg, could compare to be as efficient as a Java collector, etc.)
* extremely portable to other OS'es
* open source

Any ideas where I could find such a framework? I know of Managed C++ for
Microsoft's platform, which looks ideal, but it seems Mono does not support
this yet, and I really need cross platform portability.

Thanks, Ian

---
http://www.upright.net/ian/
 
Reply With Quote
 
 
 
 
Ian Upright
Guest
Posts: n/a
 
      05-24-2006
"Luke Meyers" <(E-Mail Removed)> wrote:

>Ian Upright wrote:
>> Hi, I'm looking for a good garbage collector for C++.
>> However, I have some constraints:

>
>Did none of the 472,000 hits on google for the search '"c++" "garbage
>collector"' satisfy your constraints?


Correct. I've spent many hours searching. Perhaps I'm an idiot. Can you
give me any links or gc's that prove otherwise?? This is what I'm looking
for.

>> In my particular application, memory fragmentation could become a real
>> problem. Thereby, the garbage collector would need to have some support for
>> being able to move objects around, and would preferably support generational
>> and some form of copying garbage collection.

>
>Memory fragmentation generally becomes a problem due to degadation of
>speed performance, does it not? Given that this is all speculation (as
>you evidently haven't measured anything -- have you implemented the
>application yet?), are you sure that this degradation would be worse
>than the overhead associated with the heavy-handed GC system you
>envision?


To sum up: YES. One of the primary benefits of a proper GC is that it
gives cache locality for newly created objects. One doesn't have to dig too
deep because there is a google full of answers to prove this if you're
interested. An "in-place" GC such as a Boehm collector does not offer this
and suffers from cache misses and fragmentation. This "heavy-handed" GC
system isn't actually very heavy handed.

>> This implies that the objects
>> may need to be using some kind of smart pointers to manage this properly.

>
>Smart pointers *and* GC? Yeah? Hmm... why not smart pointers
>*instead* of GC?


Uhh.. Do you even know what GC is? Smart pointers are not a replacement for
GC. One could perhaps implement reference counting or some other kind of
mechanisim, but this has other additional overhead, and does not collect
cycles, and is *not* modern GC. Or were you referring to some other magical
property of smart pointers that have some magical gc mechanisim inherently
built in. Any other intelligent comments?

>> Other things that are important would be:
>> * delivers commercial grade high performance
>> (eg, could compare to be as efficient as a Java collector, etc.)
>> * extremely portable to other OS'es
>> * open source

>
>Well, once you've done your own homework and determined which GC
>systems are available which at least claim to provide these properties,
>I'm sure you can get some informed opinions on this newsgroup as to how
>good they are.


So now you're suggesting I should spend countless hours doing more research
trying to find such GC systems (which I haven't been successful at finding),
instead of helping point me in the right direction and pointing out some
links that could provide what I'm looking for, when some people may already
know it and be able to tell me.

>> Any ideas where I could find such a framework? I know of Managed C++ for
>> Microsoft's platform, which looks ideal, but it seems Mono does not support
>> this yet, and I really need cross platform portability.

>
>Really? You want an efficient, portable, open-source solution, and
>Managed C++ sounds ideal to you? Please tell me you're kidding. Hell,
>hasn't even Microsoft abandoned Managed C++ in shame by now (or rather,
>confusingly repackaged it as "C++/CLI")?


Huh? What is "ideal" is where I'm referring to the ability to use C++ to
finely control what objects I want manually heap managed and what objects I
want automatically heap managed. This is the part that is ideal. Obviously
what is not ideal is the part where this idea is not available on other
non-MS platforms -- or is it? Prove me wrong, thanks.

Thanks for your (lack of) help.

Ian

---
http://www.upright.net/ian/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
JNI problem with Garbage Collector ? bart59 Java 0 06-17-2004 07:34 AM
OutOfMemoryException Error: Garbage Collector doesn't release memory to OS Pyramis ASP .Net 0 01-25-2004 04:37 PM
DVD Verdict reviews: ALIEN: COLLECTOR'S EDITION, ALIEN3: COLLECTOR'S EDITION, and more! DVD Verdict DVD Video 0 12-15-2003 10:05 AM
Garbage collector problem Colt Java 9 11-18-2003 01:15 PM
Garbage Collector Debugging Rob Tillie ASP .Net 11 08-18-2003 10:39 PM



Advertisments