Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uwm.edu!ux1.cso.uiuc.edu!uxc.cso.uiuc.edu!uxc.cso.uiuc.edu!m.cs.uiuc.edu!p.cs.uiuc.edu!johnson From: johnson@p.cs.uiuc.edu Newsgroups: comp.sw.components Subject: Re: Real-time Garbage Collection Message-ID: <130200013@p.cs.uiuc.edu> Date: 26 Sep 89 23:20:54 GMT References: <6488@hubcap.clemson.edu> Lines: 39 Nf-ID: #R:hubcap.clemson.edu:-648800:p.cs.uiuc.edu:130200013:000:1911 Nf-From: p.cs.uiuc.edu!johnson Sep 25 21:51:00 1989 > by Bill Wolfe > I think we've established that managed and unmanaged storage > paradigms can coexist, and that components which manage their > own storage can avoid the inefficiencies of garbage collection. In fact, I don't believe that managed and unmanaged storage paradigm should coexist in one program. You should either use components that use automatic garbage collection or components that do not. While it is possible to link C code to Lisp or Smalltalk, it is always tricky and error prone. > We also know that the user MUST be involved in storage management, > if for no other reason than to decide which data structures to > throw away in the event of a storage crisis. Automatic garbage collection prevents storage crises. The system I use generate an exception if it runs out of memory in spite of a garbage collection, but I wouldn't dream of trying to handle that automatically. Moreover, it only happens during debugging, and usually means an infinite loop. Bill Wolfe keeps making statements to the effect that garbage collection is expensive. That is totally false. Garbage collection is cheap. Anyone who is worried by 5% should be considering assembly language. Garbage collection is cheap and is going to be cheaper. For example, there has been little work on using optimizing compilers to reduce the cost of garbage collection. I bet that a good compiler can make automatic garbage collection cheaper than doing it yourself. The problem with garbage collection is that the efficient algorithms are not real-time. There is work being done in this area, and perhaps we will soon find a way to make real-time programming compatible with automatic memory management, but I don't think it is there yet. However, the problem with garbage collection is NOT efficiency when you measure the cost of garbage collection over the life of a program. Ralph Johnson