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

variable size classes



back to this point on variable size classes (vectors or primitive arrays)
I really don't like the idea of using 2 separate objects to create a
reference counted primitive array.  Your argument that splitting off the
variable size stuff into different heaps for efficiency/fragmentation
is reasonable, but I don't see that splitting one (2, whatever) 'fixed'
fields off from the variable portion gains >anything< except additional
overhead.  There doesn't appear to be a good reason for encapsulation
purposes, or for space efficiency.  As far as the user of the primitive
array is concerned, there is no difference.  While this immediately implies
that delegation (splitting) is appropriate, I consider the implementation to
be too low level to not take advantage of a slightly more complex
implementation to gain efficiency.
  On the other hand, if reference counting is handled in an independent
fashion for all objects (as we may be doing), then the refcounting of the
primitive arrays should be handled with that mechanism.
--Hugh