This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients njs, pitrou, vstinner
Date 2016-03-18.10:49:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In-reply-to <>
If you consider that using least signifiant bits to store an
identifier of the address space is a bad idea, I'm open to discuss how
tracemalloc should be extended to support this use case.


malloc in POSIX standard:
"The pointer returned if the allocation succeeds shall be suitably
aligned so that it may be assigned to a pointer to any type of object
and then used to access such an object in the space allocated (until
the space is explicitly freed or reallocated)."

Linux manual page has a simpler definition: "The malloc() and calloc()
functions return a pointer to the allocated memory, which is suitably
aligned for any built-in type."

malloc of the GNU libc:
"The address of a block returned by malloc or realloc in GNU systems
is always a multiple of eight (or sixteen on 64-bit systems)."

Random Google link for GPU:

"cudaMalloc() returns memory which is aligned at 256 bytes." (8 bits)

"Minimum alignment (bytes) for any datatype:    128"
Date User Action Args
2016-03-18 10:49:39vstinnersetrecipients: + vstinner, pitrou, njs
2016-03-18 10:49:39vstinnerlinkissue26530 messages
2016-03-18 10:49:37vstinnercreate