Author vstinner
Recipients njs, pitrou, vstinner
Date 2016-03-21.15:55:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1458575707.8.0.60951980567.issue26588@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2016-03-21 15:55:09vstinnersetrecipients: + vstinner, pitrou, njs
2016-03-21 15:55:07vstinnersetmessageid: <1458575707.8.0.60951980567.issue26588@psf.upfronthosting.co.za>
2016-03-21 15:55:07vstinnerlinkissue26588 messages
2016-03-21 15:55:07vstinnercreate