{"author":"Stefan Eissing","author_email":"stefan@eissing.org","author_time":1742892460,"commit_time":1744903718,"committer":"Daniel Stenberg","committer_email":"daniel@haxx.se","hash":"909af1a43b5a7fed8b5a4ca145e39f46b2f50325","message":"multi: do transfer book keeping using mid\n\nChange multi's book keeping of transfers to no longer use lists, but a\nspecial table and bitsets for unsigned int values.\n\n`multi-xfers` is the `uint_tbl` where `multi_add_handle()` inserts a new\ntransfer which assigns it a unique identifier `mid`. Use bitsets to keep\ntrack of transfers that are in state \"process\" or \"pending\" or\n\"msgsent\".\n\nUse sparse bitsets to replace `conn->easyq` and event handlings tracking\nof transfers per socket. Instead of pointers, keep the mids involved.\n\nProvide base data structures and document them in docs/internal:\n* `uint_tbl`: a table of transfers with `mid` as lookup key,\n   handing out a mid for adds between 0 - capacity.\n* `uint_bset`: a bitset keeping unsigned ints from 0 - capacity.\n* `uint_spbset`: a sparse bitset for keeping a small number of\n  unsigned int values\n* `uint_hash`: for associating `mid`s with a pointer.\n\nThis makes the `mid` the recommended way to refer to transfers inside\nthe same multi without risk of running into a UAF.\n\nModifying table and bitsets is safe while iterating over them. Overall\nmemory requirements are lower as with the double linked list apprach.\n\nCloses #16761\n","parents":["02e9690c3ee2feb7c78c93c1c544c898df733383"],"tree_hash":"eb438711e9b5c123a90d5947903eb5e196b8a125"}