mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-27987: pymalloc: align by 16bytes on 64bit platform (GH-12850)
This commit is contained in:
parent
c923c3449f
commit
f0be4bbb9b
2 changed files with 9 additions and 0 deletions
|
@ -795,8 +795,14 @@ static int running_on_valgrind = -1;
|
|||
*
|
||||
* You shouldn't change this unless you know what you are doing.
|
||||
*/
|
||||
|
||||
#if SIZEOF_VOID_P > 4
|
||||
#define ALIGNMENT 16 /* must be 2^N */
|
||||
#define ALIGNMENT_SHIFT 4
|
||||
#else
|
||||
#define ALIGNMENT 8 /* must be 2^N */
|
||||
#define ALIGNMENT_SHIFT 3
|
||||
#endif
|
||||
|
||||
/* Return the number of bytes in size class I, as a uint. */
|
||||
#define INDEX2SIZE(I) (((uint)(I) + 1) << ALIGNMENT_SHIFT)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue