Rob Shearman : msvcrt: Free memory allocated in TLS slot on module unload as well as thread exit.

Nikolay Sivov bunglehead at gmail.com
Mon Dec 14 11:39:07 CST 2009


On 12/14/2009 20:35, Rob Shearman wrote:
> 2009/12/14 Nikolay Sivov<bunglehead at gmail.com>:
>    
>> On 12/14/2009 18:51, Alexandre Julliard wrote:
>>      
>>> Module: wine
>>> Branch: master
>>> Commit: c20868e0a2f7af909cf8af2877ae8b024fa6d11e
>>> URL:
>>>   http://source.winehq.org/git/wine.git/?a=commit;h=c20868e0a2f7af909cf8af2877ae8b024fa6d11e
>>>
>>> Author: Rob Shearman<robertshearman at gmail.com>
>>> Date:   Mon Dec 14 14:13:57 2009 +0000
>>>
>>> msvcrt: Free memory allocated in TLS slot on module unload as well as
>>> thread exit.
>>>
>>> ---
>>>
>>>   dlls/msvcrt/main.c |   27 +++++++++++++++------------
>>>   1 files changed, 15 insertions(+), 12 deletions(-)
>>>
>>>        
>> It's a partial solution I suppose? I works for a one thread only that
>> unloads module.
>>      
> The real motive for the patch was to free the memory on process exit
> to silence valgrind warnings. In reality, I don't believe msvcrt would
> be loaded dynamically by an app, but if we did want to cope with this
> the code could be changed to maintain a linked list of the objects
> allocated for this purpose or to use a private heap.
>    
Sure, that's ok, most tests (if not all) are single threaded. Already 
discussed some time ago,
no need in such complication here, just exit as fast as possible is 
preferable.




More information about the wine-devel mailing list