Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2002-07-03 08:43:03


David Abrahams wrote:
> Hi Vladimir,
>
> Did you ever pursue that memory issue any further? I have a feeling there
> are some massive performance gains to be had somewhere.

I've just fixed a memory leak introduced by somebody, appearently some ghost
;-), in expand.c. Will commit shortly. But...

1. We still have memory leaks.... see the attached file. The top memory leak
is that all strings are allocated using newstr but never freed.

2. It would be possible to free all the memory in the end, but I doubt that
peak memory consumption can be much reduced -- many things are just allocated
and not reference counted in any way.

- Volodya --------------Boundary-00=_R3EOX6YH2S23RKK903L9 Content-Type: text/plain;
charset="iso-8859-1";
name="leaks"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="leaks"

PT0zMDcyMT09IHZhbGdyaW5kLTEuMHByZTIsIGEgbWVtb3J5IGVycm9yIGRldGVjdG9yIGZv
ciB4ODYgR05VL0xpbnV4Lgo9PTMwNzIxPT0gQ29weXJpZ2h0IChDKSAyMDAwLTIwMDIsIGFu
ZCBHTlUgR1BMJ2QsIGJ5IEp1bGlhbiBTZXdhcmQuCj09MzA3MjE9PSBFc3RpbWF0ZWQgQ1BV
IGNsb2NrIHJhdGUgaXMgMTQ2MSBNSHoKPT0zMDcyMT09IEZvciBtb3JlIGRldGFpbHMsIHJl
cnVuIHdpdGg6IC12Cj09MzA3MjE9PSAKPT0zMDcyMT09IAo9PTMwNzIxPT0gRVJST1IgU1VN
TUFSWTogMCBlcnJvcnMgZnJvbSAwIGNvbnRleHRzIChzdXBwcmVzc2VkOiA2NzIgZnJvbSAy
KQo9PTMwNzIxPT0gbWFsbG9jL2ZyZWU6IGluIHVzZSBhdCBleGl0OiAyNjcyNDAyIGJ5dGVz
IGluIDEzMzAwNiBibG9ja3MuCj09MzA3MjE9PSBtYWxsb2MvZnJlZTogMzI0NzEyIGFsbG9j
cywgMTkxNzA2IGZyZWVzLCAyODM4Mzc0NiBieXRlcyBhbGxvY2F0ZWQuCj09MzA3MjE9PSBG
b3IgY291bnRzI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AxMTkzIGJ5dGVzIGluIDE2IGJsb2Nrcy4KPT0z
MDcyMT09ICAgIHN0aWxsIHJlYWNoYWJsZTogMTk1MjkzOSBieXRlcyBpbiAxMDk3NjAgYmxv
Y2tzLgo9PTMwNzIxPT0gUmVhY2hhYmxlIGJsb2NrcyAodGhvc2UgdG8gd2hpY2ggYSBwb2lu
dGVyIHdhcyBmb3VuZCkgYXJlIG5vdCBzaG93bi4KPT0zMDcyMT09IFRvIHNlZSB0aGVtLCBy
ZXJ1biB3aXRoOiAtLXNob3ctcmVhY2hhYmxlPXllcwo9PTMwNzIxPT0gCg==
 --------------Boundary-00=_R3EOX6YH2S23RKK903L9--


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk