[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Tradeoffs with resources



   Date: Fri, 21 Sep 90 13:39 EDT
   From: Barry Margolin <barmar@think.com>

   ...

   You probably don't want to do *any* EGC on the area containing the
   objects managed by the resource.  By definition, objects in resources
   are long-lived, and EGC is optimized for short-lived objects.  If you
   allocate a resourced object in an ephemeral area you're just wasting the
   EGC's time.

I guess you're right.  I was speculating that the EGC might improve
paging performance of a large resource over the long haul by
periodically moving related resource objects in the area closer
together.  But once a resource has enough objects, theoretically no
more allocation would be done in the area so the EGC wouldn't be
invoked.

This points out another way in which EGC could be more effective than
using resources: An EGC, because it can copy related objects so they
are close together, might improve paging performance over the long
haul.  In contrast, I would expect that a large number of resource
allocated objects might exhibit decreasing locality over a long period
of time if they are unsystematically allocated and deallocated many
times.  (I'm assuming resources aren't doing any free-object
rearrangement to improve locality -- do they?)

Cheers,

CarlManning