Janitorial dlls/advapi32/registry.c W->A cleanup

Tony Lambregts tony_lambregts at telusplanet.net
Thu Mar 6 19:52:01 CST 2003


Dmitry Timoshkov wrote:

>"Alexandre Julliard" <julliard at winehq.com> wrote:
>
>  
>
>>>Thus, there is no need to waste CPU cycles by allocating/deallocating
>>>memory, but instead having an automatic buffer on the stack will be
>>>quite enough. See files/drive.c,GetCurrentDirectoryA for a sample.
>>>
>>>All other APIs which get a file name as a parameter should be rewritten
>>>that way too. Probably that's the task for yet another janitorial project...
>>>      
>>>
>>I don't think I agree with that. Our file I/O functions already use
>>way too much stack precisely because we use MAX_PATH stack buffers all
>>over the place, and we should be getting rid of them, not adding even
>>more.
>>
>>Note that in advapi32, you can use the static Unicode buffer in the
>>TEB to avoid memory allocations. We could probably use it in at least
>>some of the kernel ANSI functions too.
>>    
>>
>
>I was going to object, but decided to look at the real thing first.
>You are right Alexandre, kernel32.dll from win2k uses unicode buffer in
>the TEB for all the ANSI APIs I looked at. So yes, that's the way to go.
>
>  
>
For the benefit of those of us who are a little thick could someone 
explain what that means. I understand that the TEB has TlsSlots for 
local storage but.. there is so much I do not understand. A little help...

-- 

Tony Lambregts






More information about the wine-devel mailing list