runtime_loader: set default alignment to max_align_t if available

...as done by mmlr in malloc_debug.
TLS blocks are expected to be aligned, gcc happily uses SSE instructions,
triggering exceptions.

Change-Id: I5a7bfe287600286e724cd13fe9aa7c7916091979
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3768
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
This commit is contained in:
Jérôme Duval 2021-03-09 18:29:32 +01:00
parent 9aed476999
commit 06a78d0d88

View File

@ -36,7 +36,12 @@
To ease list handling, the list anchor itself is a free chunk with
size 0 that can't be allocated.
*/
#if __cplusplus >= 201103L
#include <cstddef>
const static size_t kAlignment = alignof(max_align_t);
#else
const static size_t kAlignment = 8;
#endif
// all memory chunks will be a multiple of this
const static size_t kInitialHeapSize = 64 * 1024;