[PATCH 1/2] advapi32: HKCR merge: foundation

Alexandre Julliard julliard at winehq.org
Fri Oct 25 03:31:10 CDT 2013


George Stephanos <gaf.stephanos at gmail.com> writes:

>     You need some sort of free list instead of a linear search.
>
> Alright. 
>
>     Also you can probably avoid one level of pointers and store
>     objects directly.
>     
>
> I thought about this. If I store objects directly, accessing any would
> require a lock on the whole table so I guarantee it's not moved or
> reallocated elsewhere. This would obviously be pretty slow.

You already have a lock on the whole table anyway.

>     Returning a pointer to the object outside of the critical section
>     is not
>     a good idea. 
>
> The critical section just protects the table and not the
> handles/structs themselves.

Yes, that's the problem. The structs have to be protected too.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list