Patch version 5:
* add hashtable_compare_pointer_t() which compares pointer_t fields (ptr and domain) rather using _Py_hashtable_compare_direct() which causes issues with padding
* hashtable_hash_pointer_t() now uses memcpy() to get the pointer_t value rather than a pointer dereference
Antoine:
> What about compilers that don't support "__attribute__((packed))"?
packed is a small and *optional* optimization on the memory footprint of _tracemalloc structure (reduce tracemalloc.get_tracemalloc_memory()).
Using packed can introduce memory alignment issue, but since tracemalloc uses memcpy(), it *should* be fine in practice. Again, since I don't have access to SPARC CPU, I don't know how to test.
> Instead you could use a compare func that compares struct fields...
Done.