summaryrefslogtreecommitdiff
path: root/src/alloc-aligned.c
diff options
context:
space:
mode:
authordaan <daanl@outlook.com>2021-12-17 13:25:38 -0800
committerdaan <daanl@outlook.com>2021-12-17 13:25:38 -0800
commitfaf2a7020c4d3234434b165f5c27f89d7777016b (patch)
tree1b2275a143f2a77833f9fef6e6bec82e827f1ec4 /src/alloc-aligned.c
parent89f583a69b86a06966fb07b4794b4046faa01fee (diff)
add extra alignment tests
Diffstat (limited to 'src/alloc-aligned.c')
-rw-r--r--src/alloc-aligned.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/alloc-aligned.c b/src/alloc-aligned.c
index 12706f7..3a608b8 100644
--- a/src/alloc-aligned.c
+++ b/src/alloc-aligned.c
@@ -51,19 +51,19 @@ static void* mi_heap_malloc_zero_aligned_at(mi_heap_t* const heap, const size_t
mi_assert(alignment > 0);
if (mi_unlikely(alignment==0 || !_mi_is_power_of_two(alignment))) { // require power-of-two (see <https://en.cppreference.com/w/c/memory/aligned_alloc>)
#if MI_DEBUG > 0
- _mi_error_message(EOVERFLOW, "aligned allocation requires the alignment to be a power-of-two (size %zu, alignment %zu)", size, alignment);
+ _mi_error_message(EOVERFLOW, "aligned allocation requires the alignment to be a power-of-two (size %zu, alignment %zu)\n", size, alignment);
#endif
return NULL;
}
if (mi_unlikely(alignment > MI_ALIGNED_MAX)) { // we cannot align at a boundary larger than this (or otherwise we cannot find segment headers)
#if MI_DEBUG > 0
- _mi_error_message(EOVERFLOW, "aligned allocation has a maximum alignment of %zu (size %zu, alignment %zu)", MI_ALIGNED_MAX, size, alignment);
+ _mi_error_message(EOVERFLOW, "aligned allocation has a maximum alignment of %zu (size %zu, alignment %zu)\n", MI_ALIGNED_MAX, size, alignment);
#endif
return NULL;
}
if (mi_unlikely(size > PTRDIFF_MAX)) { // we don't allocate more than PTRDIFF_MAX (see <https://sourceware.org/ml/libc-announce/2019/msg00001.html>)
#if MI_DEBUG > 0
- _mi_error_message(EOVERFLOW, "aligned allocation request is too large (size %zu, alignment %zu)", size, alignment);
+ _mi_error_message(EOVERFLOW, "aligned allocation request is too large (size %zu, alignment %zu)\n", size, alignment);
#endif
return NULL;
}