diff options
| author | thegeorg <[email protected]> | 2025-01-21 20:01:24 +0300 |
|---|---|---|
| committer | thegeorg <[email protected]> | 2025-01-21 20:28:14 +0300 |
| commit | 6b26b7fba89ee483b19cef1b1f9adfc50a0b882c (patch) | |
| tree | a213b47c3532dddccec07dc0ac8e16a97da4843b /contrib/libs/cxxsupp/libcxxabi/src/fallback_malloc.cpp | |
| parent | 10feea72534dc5f149c6f0282675e76da8102275 (diff) | |
Update contrib/libs/cxxsupp/libcxxabi to 18.1.8
commit_hash:782297dacb6df72c5c25e9298cf3ef6b2861b9f6
Diffstat (limited to 'contrib/libs/cxxsupp/libcxxabi/src/fallback_malloc.cpp')
| -rw-r--r-- | contrib/libs/cxxsupp/libcxxabi/src/fallback_malloc.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/contrib/libs/cxxsupp/libcxxabi/src/fallback_malloc.cpp b/contrib/libs/cxxsupp/libcxxabi/src/fallback_malloc.cpp index 11e79740ffb..76bd2e9bcd9 100644 --- a/contrib/libs/cxxsupp/libcxxabi/src/fallback_malloc.cpp +++ b/contrib/libs/cxxsupp/libcxxabi/src/fallback_malloc.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// #include "fallback_malloc.h" +#include "abort_message.h" #include <__thread/support.h> #ifndef _LIBCXXABI_HAS_NO_THREADS @@ -16,7 +17,7 @@ #endif #include <__memory/aligned_alloc.h> -#include <assert.h> +#include <__assert> #include <stdlib.h> // for malloc, calloc, free #include <string.h> // for memset @@ -142,7 +143,7 @@ void* fallback_malloc(size_t len) { // Check the invariant that all heap_nodes pointers 'p' are aligned // so that 'p + 1' has an alignment of at least RequiredAlignment - assert(reinterpret_cast<size_t>(p + 1) % RequiredAlignment == 0); + _LIBCXXABI_ASSERT(reinterpret_cast<size_t>(p + 1) % RequiredAlignment == 0, ""); // Calculate the number of extra padding elements needed in order // to split 'p' and create a properly aligned heap_node from the tail @@ -163,7 +164,7 @@ void* fallback_malloc(size_t len) { q->next_node = 0; q->len = static_cast<heap_size>(aligned_nelems); void* ptr = q + 1; - assert(reinterpret_cast<size_t>(ptr) % RequiredAlignment == 0); + _LIBCXXABI_ASSERT(reinterpret_cast<size_t>(ptr) % RequiredAlignment == 0, ""); return ptr; } @@ -176,7 +177,7 @@ void* fallback_malloc(size_t len) { prev->next_node = p->next_node; p->next_node = 0; void* ptr = p + 1; - assert(reinterpret_cast<size_t>(ptr) % RequiredAlignment == 0); + _LIBCXXABI_ASSERT(reinterpret_cast<size_t>(ptr) % RequiredAlignment == 0, ""); return ptr; } } |
