Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!gem.mps.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!hplabs!hp-pcd!hplsla!jima From: jima@hplsla.HP.COM (Jim Adcock) Newsgroups: comp.lang.c++ Subject: Re: Support for movable objects in C++ Message-ID: <6590275@hplsla.HP.COM> Date: 3 Oct 89 17:23:25 GMT References: <1989Sep30.051559.20644@polyslo.CalPoly.EDU> Organization: HP Lake Stevens, WA Lines: 14 > Heap fragmentation should not be treated lightly either. Let the system > contains N bytes of free space, and S small objects in memory. For a totally > fragmented system, the largest object size that can be allocated is > (N - S * small_object_size) / (S+1) > The largest object size that can be allocated in a heap compacted system is > (N - S * small_object_size) This was gone over before too. The goal of garbage collection on a modern machine with virtual memory is not really to keep heap within a fixed sized arena, but rather to slow the growth of heap used. As Boehm shows, GCs can't recover all memory lost in any case. If one does not force an artificial upper bound on heap, one finds that fragmented systems tend use about 50% of the memory "occupied", and waste the other half. I'm not sure this is really all that bad.