[libc-commits] [libc] [WIP][libc] Add freelist malloc (PR #94270)

Petr Hosek via libc-commits libc-commits at lists.llvm.org
Mon Jun 3 22:05:24 PDT 2024


================
@@ -74,6 +74,9 @@ LIBC_INLINE void *operator new[](size_t size, std::align_val_t align,
   return LIBC_NAMESPACE::AllocChecker::aligned_alloc(size, align, ac);
 }
 
+LIBC_INLINE void *operator new(size_t, void *__p) { return __p; }
+LIBC_INLINE void *operator new[](size_t, void *__p) { return __p; }
----------------
petrhosek wrote:

Should these be declared as `noexcept`?

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


More information about the libc-commits mailing list