On Mon, 2006-09-18 at 09:26 -0400, Peter Tanski wrote: > Incremental GC is excellent. I am a big fan of incremental GC for > multi-threaded applications. But stop-world GC? In a real-time > video game that means a potential pause in the action, right? I > don't know very much about GC in video games. Do you know of any > video games that use stop-world instead of incremental GC?
All of them probably. Most games are written in C or C++. There's only one available GC, Boehm, and it is stop-world. [Actually newer versions of the Boehm collector provide 'incremental' collection] The thing is, stopping the world for a FP language collector is a serious problem. FPLs spew heaps of garbage. Stopping the world for Felix collector isn't .. because the collector can be configured to only run when you tell it. Also, unlike an FPL, Felix provides other memory management techniques: (a) malloc/free calls (b) C++ ctor/dtor and of course you can write ref-counting stuff if you want. The collector is mainly used for variants and stack frames which are pushed onto the heap. Such heap frames are required when you use higher order functions with closures where the inliner can't figure out which function it was. Note the frames are large, and data is typically unboxed. Most calls are direct, and such calls are usually inlined away, so the program is quite seriously flattened out, eliminating many, if not all, the heaped stack frames. And as the 'bug' recently posted indicates Felix can ALSO push stack frames onto the machine stack. The thing is .. writing a game, if you're emulating closures and/or have circular data structures .. you have little choice but to write a garbage collector anyhow. In other words .. Felix is likely to perform BETTER than any equivalent hand written code, and certainly better than a conservative scan everything collector (remember Felix collector is precise not conservative). On a uni-processor, stopping the world isn't really that much of a problem -- the serious problem is when you have a major server with multiple CPUs and all of them have to stop to wait for collection. -- John Skaller <skaller at users dot sf dot net> Felix, successor to C++: http://felix.sf.net ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language