***SPAM*** Re: ***SPAM*** Re: [ofa-general] Re: [PATCH] infiniband-diags: Fix memory leaks on IBERROR and IBPANIC

Bart Van Assche bart.vanassche at gmail.com
Fri Mar 13 05:00:26 PDT 2009


On Thu, Mar 12, 2009 at 7:05 PM, Hal Rosenstock
<hal.rosenstock at gmail.com> wrote:
> On Thu, Mar 12, 2009 at 1:45 PM, Hal Rosenstock
> <hal.rosenstock at gmail.com> wrote:
>> On Thu, Mar 12, 2009 at 1:35 PM, Sean Hefty <sean.hefty at intel.com> wrote:
>>>>It's not a matter of relying on exit for open fds but rather the
>>>>allocated memory under the covers of mad_rpc_open_port so no longer
>>>>can one rely on just exit and this needs to be made explicit.
>>>
>>> The OS should reclaim any allocated memory not freed by the app when it exits.
>>> Is this your concern?
>>
>> malloc'd memory ?
>
> Many OSs do but not all. Should we rely on this ? Also, don't other
> userspace programs attempt to properly cleanup after themselves rather
> than rely on OS cleanup behavior ?

Letting an application deallocate all allocated resources before it
exits makes it easier to analyze these applications with run-time
analysis tools like Valgrind. Valgrind is able to perform memory leak
checking and file descriptor leak detection.

Bart.



More information about the general mailing list