|Title||MPS ambiguous internal pointer makes AMC pool retain memory as pads|
|Assigned user||Richard Kistruck|
|Description||MPS ambiguous internal pointer makes AMC pool retain memory as pads|
- job001811 "MPS AMC small nailed objects risk big retention by placement after big objects"
When allocating very large objects (order 10MB), AMC pool can retain
large amounts of memory as pads, apparently because of an ambiguous
internal pointer (that is: a pointer in an ambiguous root, such as
the stack, which points into the middle of an object). Such a
pointershould not and does not preserve the object, but it causes
MPS AMC pool to convert the memory into a pad object, where in some
circumstances the memory could be freed instead.
amcReclaimNailed() converts dead objects to pads, but does not call
SegFree(). This is correct and required if some objects are still
alive, or the seg is buffered. But if all objects in the seg are
dead, and the seg is unbuffered, then it should be possible to call
If the seg is small, the retained pad is small. But if the seg
contains a very large object, the amount of retained memory is also
Fix (in this job): call SegFree() when possible.
Experimental release exp-164852 shows the benefits of calling SegFree.
(A further improvement would be to not put large and small objects
together in a seg. See job001811.)
|Evidence||See [pads on heap] <|
and the discussion that followed.
|Created by||Richard Kistruck|
|Created on||2008-04-30 16:25:58|
|Last modified by||Richard Kistruck|
|Last modified on||2008-05-01 17:12:32|
|History||2008-04-30 RHSK Created.|
2008-05-01 RHSK Cross-ref to job001811.
|164885||closed||2008-04-30 18:56:56||Richard Kistruck||MPS master (integ from br/auto_header): make amcReclaimNailed() call
SegFree if the seg had no preserved objects, no buffer, and is no
longer nailed for any trace.
|164884||closed||2008-04-30 16:50:12||Richard Kistruck||MPS br/auto_header: (cosmetic) tidy up, add AVER unbuffered.|
|164851||closed||2008-04-29 15:09:12||Richard Kistruck||MPS br auto_header: cannot SegFree nailed seg if it has a buffer|
|164849||open||2008-04-29 14:52:35||Richard Kistruck||MPS br auto_header (not the right place for this): fix .nailboard.limitations.middle;
see mail from Configura.