[libc-commits] [libc] POC: add snmalloc as an alternative allocator to libc (PR #122284)

via libc-commits libc-commits at lists.llvm.org
Wed Jan 15 20:13:23 PST 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff ec5d17b58779e2fb08a7c9c706b2842586f71f78 96ebfa909efe6f6f31c6a28e99649a586f152404 --extensions cpp -- libc/src/stdlib/snmalloc/aligned_alloc.cpp libc/src/stdlib/snmalloc/calloc.cpp libc/src/stdlib/snmalloc/free.cpp libc/src/stdlib/snmalloc/malloc.cpp libc/src/stdlib/snmalloc/mallopt.cpp libc/src/stdlib/snmalloc/realloc.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/libc/src/stdlib/snmalloc/free.cpp b/libc/src/stdlib/snmalloc/free.cpp
index a3160c15d0..eb403710ff 100644
--- a/libc/src/stdlib/snmalloc/free.cpp
+++ b/libc/src/stdlib/snmalloc/free.cpp
@@ -11,7 +11,7 @@
 #include "src/__support/common.h"
 
 namespace LIBC_NAMESPACE_DECL {
-LLVM_LIBC_FUNCTION(void, free, (void * ptr)) {
+LLVM_LIBC_FUNCTION(void, free, (void *ptr)) {
   return snmalloc::libc::free(ptr);
 }
 } // namespace LIBC_NAMESPACE_DECL

``````````

</details>


https://github.com/llvm/llvm-project/pull/122284


More information about the libc-commits mailing list