tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Leak Sanitizer - how to suppress leaks
In article <20190913072314.GA16985%mail.duskware.de@localhost>,
Martin Husemann <martin%duskware.de@localhost> wrote:
>On Fri, Sep 13, 2019 at 08:33:31AM +0200, Thomas Klausner wrote:
>> I'm sorry, I totally do not get it the problem with -- in general --
>> writing the code in such a way that it properly frees any allocations
>> it made.
>>
>> I suspect there will be corner cases where it will be really hard, and
>> we can discuss those separately. But discussing about adding a free()
>> in ps? (If it was done incorrectly, let's fix it.)
>>
>> Please enlighten me.
>
>There sometimes is a non-trivial amount of work to do to properly free up
>everything. This gains us nothing when we know it happens exactly once
>before exiting.
>
>I remember timing a compiler pass where the runtime was cut to slightly
>about 50% by just avoiding freeing the AST (which was built once for
>the pass, of course). This obviously was decades before Rust and C++,
>but nevertheless - sometimes the time saving can be huge.
Right, I think that we should let people decide how to disable the errors.
Provide a cpp macro for it and then they can choose how to do it.
christos
Home |
Main Index |
Thread Index |
Old Index