diff options
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/alloc.c b/src/alloc.c index 28ca7804ee9..abb98a9eb68 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -641,9 +641,11 @@ buffer_memory_full (ptrdiff_t nbytes) | |||
| 641 | implement Lisp objects; since pseudovectors can contain any C type, | 641 | implement Lisp objects; since pseudovectors can contain any C type, |
| 642 | this is max_align_t. On recent GNU/Linux x86 and x86-64 this can | 642 | this is max_align_t. On recent GNU/Linux x86 and x86-64 this can |
| 643 | often waste up to 8 bytes, since alignof (max_align_t) is 16 but | 643 | often waste up to 8 bytes, since alignof (max_align_t) is 16 but |
| 644 | typical vectors need only an alignment of 8. However, it is not | 644 | typical vectors need only an alignment of 8. Although shrinking |
| 645 | worth the hassle to avoid this waste. */ | 645 | the alignment to 8 would save memory, it cost a 20% hit to Emacs |
| 646 | enum { LISP_ALIGNMENT = alignof (union { max_align_t x; GCALIGNED_UNION }) }; | 646 | CPU performance on Fedora 28 x86-64 when compiled with gcc -m32. */ |
| 647 | enum { LISP_ALIGNMENT = alignof (union { max_align_t x; | ||
| 648 | GCALIGNED_UNION_MEMBER }) }; | ||
| 647 | verify (LISP_ALIGNMENT % GCALIGNMENT == 0); | 649 | verify (LISP_ALIGNMENT % GCALIGNMENT == 0); |
| 648 | 650 | ||
| 649 | /* True if malloc (N) is known to return storage suitably aligned for | 651 | /* True if malloc (N) is known to return storage suitably aligned for |