Title | MPS ambiguous internal pointer makes AMC pool retain memory as pads |
Status | closed |
Priority | essential |
Assigned user | Richard Kistruck |
Organization | Ravenbrook |
Description | MPS ambiguous internal pointer makes AMC pool retain memory as pads Related jobs: - job001811 "MPS AMC small nailed objects risk big retention by placement after big objects" RHSK 2008-04-30 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. |
Analysis | RHSK 2008-04-30 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 SegFree. 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 very large. 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.) |
How found | customer |
Evidence | See [pads on heap] <http://info.ravenbrook.com/mail/2008/04/28/18-39-11/0.txt >and the discussion that followed. |
Observed in | 1.108.1 |
Introduced in | 1.100.0 |
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. |
Change | Effect | Date | User | Description |
---|---|---|---|---|
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. |