[gclist] Games in C++ with GC? (why malloc/free instead of GC?)

Thomas Johnsson johnsson@crt.se
Tue, 18 Feb 2003 09:42:47 +0100


Further to this disscussion about the use of GC:

Games, espcially 3D games, are often written in C++, using DirectX (or OpenGL).
Is there any experience in using GC ()conservative or not) in such applications?
Being a sort of real time program, I can imagine GC latencies is a potential problem ...
???

-- Thomas Johnsson




Basile STARYNKEVITCH writes:
 > >>>>> "Michael" == Michael Hicks <mwh@cs.umd.edu> writes:
 > 
 >     Michael> A number of performance studies (starting with Zorn in
 >     Michael> `92, but perhaps before?) and anecdotal evidence now
 >     Michael> suggests that there is little reason to use malloc/free
 >     Michael> over GC.  Zorn states that the main shot against
 >     Michael> conservative GC is that it requires a larger memory
 >     Michael> footprint (and actually uses much of it).  Another shot
 >     Michael> might be the unexpected latency resulting from GC,
 >     Michael> foiling soft real-time guarantees.
 > 
 > I tend to believe that people prefer malloc&free to Boehm's GC without
 > real technical reasons, but mostly for social reasons. [The almost
 > only soft realtime guarantee people want -outside the embedded market-
 > is compatibility with graphical user interfaces time requirements]
 > 
 > Most people I know that are proficient C coders did not even heard of
 > GC techniques (in particular Boehm's GC) before I talked them about
 > it.
 > [etc]