24 Feb
2024
24 Feb
'24
2:52 p.m.
Jinoh Kang (@iamahuman) commented about server/mapping.c:
+ + return 0; +} + +int alloc_shared_object(void) +{ + int index; + + for (index = 0; index < session.object_count; index++) + if (!session.shared->objects[index].obj.id) + break; + if (index == session.object_count) + { + if (session.object_count == session.object_capacity && grow_session_mapping()) return -1; + index = session.object_count++; + } Not a blocker, but wouldn't it be faster if we didn't scan empty slots before we actually run out of capacity?
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/3103#note_62517