tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: updates?



Hi Christos,

  This patch fix the memory leak that you found in the RT patch.

https://github.com/ycui1984/posixtestsuite/blob/master/patches/REALTIME_SIGNAL/0008-bug-fix.patch

2016-07-29 9:07 GMT-07:00 Charles Cui <charles.cui1984%gmail.com@localhost>:

> I will see how to improve this part.
>
>
> Thanks Charles
>
> 2016-07-29 1:00 GMT-07:00 Christos Zoulas <christos%astron.com@localhost>:
>
>> In article <CA+SXE9tdKyLz-YsS8Gu=dP79jwarxj5Fx1E2KcqomM=
>> rYEmbig%mail.gmail.com@localhost>,
>> Charles Cui  <charles.cui1984%gmail.com@localhost> wrote:
>>
>> >> yes, but where does the ksiginfo get freed now since you removed:
>> >> -               ksiginfo_free(ksi);     /* XXXSMP */
>> >>
>> >well, the original logic only finds one target signal and return true, at
>> >that time ksi is pointing to some data,
>> >in my case, I need to loop all signals to return the count, and at the
>> end
>> >of the loop, ksi is set to be NULL.
>>
>> Ok, there are multiple ksi entries for the same signal in the loop. Each
>> invocation returns the count of them and pops the first one and returns
>> the count. Setting it to NULL does not free the data, you need to free
>> the data for the ksiginfo you freed. If you keep running the code you
>> should see signal memory accumulate.
>>
>> christos
>>
>>
>


Home | Main Index | Thread Index | Old Index