[libc-commits] [libc] [libc] Lazily initialize freelist malloc using symbols (PR #99254)

via libc-commits libc-commits at lists.llvm.org
Mon Jul 22 11:59:17 PDT 2024


================
@@ -0,0 +1,20 @@
+//===-- Test fake definition for __llvm_libc_heaplimit --------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "src/__support/CPP/cstddef.h"
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+extern "C" {
+// This isn't used in the unit tests, but it must be defined for the non-fake
+// version of the heap to work.
+cpp::byte __llvm_libc_heap_limit;
----------------
PiJoules wrote:

Does `_end` also need to be defined here?

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


More information about the libc-commits mailing list