On Thu Feb 6 17:32:05 2025 +0000, Elizabeth Figura wrote:
It was done this way to avoid allocating extra memory or fds for objects which are never used from the client side. You could limit it to event/semaphore/mutex, which are useless otherwise, but even those can often be created without ever being used (in fact, I believe one of the first applications to leak hundreds of thousands of objects did this.) I'm not sure that always creating an inproc_sync object and its backing ntsync fd would be a worthwhile improvement.
I think the lazy initialization makes the code very non-obvious where the state is being kept, and reading the code it's as if wineserver could begin using the objects then only later delegating things to the kernel, which, according to your description elsewhere is not going to work.