Liste des Groupes | Revenir à cl c |
On 5/23/2024 5:32 PM, Chris M. Thomasson wrote:<https://wiki.osdev.org/Global_Descriptor_Table>On 5/23/2024 4:11 AM, Malcolm McLean wrote:There was an old paper from microsoft that had a pointer hash. It was used to index into a table of locks. I need to find it.>>
What is a good hash function for pointers to use in portable ANSI C?
>
The pointers are nodes of a tree, which are read only, and I want to associate read/write data with them. So potentially a lage number of pointers,and they might be consecutively ordered if they are taken from an array, or they might be returned from repeared calls to malloc() with small allocations. Obviously I have no control over pointer size or internal representation.
>
I kind of remember an old one for 32-bit pointers. It was something like multiply by a prime and shift to the right by 7 or 8. Shit, I think. It was way back on comp.programming.threads.
Les messages affichés proviennent d'usenet.