Alexandre Julliard julliard@winehq.org wrote on Feb 23:
Aric Stewart aric@codeweavers.com writes:
- /* If i understand this correctly at most a process should generate
* only a handful of these... But in case I am wrong */
- if (id_last == 65535)
- {
ERR("TfClientIds generated exceeds USHORT limit\n");
return 0x0;
- }
- id_last++;
- id->id = MAKELONG(id_last, magic);
- id->data = data;
- list_add_head(&clientids,&id->entry);
Using an array index would be cleaner than having to search through the list everytime you use an id.
Also, aren't linked lists inefficient as well. Searching through them can be very intense, unless they are small (< 5 elements). Anything larger than this and an array would be more efficient.
James McKenzie
Yup, reworked and resent.
-aric
James Mckenzie wrote:
Alexandre Julliard julliard@winehq.org wrote on Feb 23:
Aric Stewart aric@codeweavers.com writes:
- /* If i understand this correctly at most a process should generate
* only a handful of these... But in case I am wrong */
- if (id_last == 65535)
- {
ERR("TfClientIds generated exceeds USHORT limit\n");
return 0x0;
- }
- id_last++;
- id->id = MAKELONG(id_last, magic);
- id->data = data;
- list_add_head(&clientids,&id->entry);
Using an array index would be cleaner than having to search through the list everytime you use an id.
Also, aren't linked lists inefficient as well. Searching through them can be very intense, unless they are small (< 5 elements). Anything larger than this and an array would be more efficient.
James McKenzie