15 Jul
2025
15 Jul
'25
2:47 p.m.
On Mon Jul 14 12:33:49 2025 +0000, Vibhav Pant wrote:
<span dir="">This could also be accomplished by letting `device_instance_id` be a stack-allocated array, and using `wcsdup`</span>. That way we're not unnecessarily allocating 400 bytes for every device object. `HeapAlloc` is not called for every device object in this loop. Only for that in which we save id \+ maybe one excessive.
We could make `instance_id` in `wine_device` an array instead of a pointer. But then `wine_device` struct would have more size for every device, but only PDOs really have id. I do not know what is preferred. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/8015#note_109977