[libc-commits] [libc] [libc][stdlib] Add the FreelistHeap (PR #95066)
Michael Jones via libc-commits
libc-commits at lists.llvm.org
Wed Jun 12 15:51:15 PDT 2024
================
@@ -0,0 +1,189 @@
+//===-- Interface for freelist_heap ---------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SRC_STDLIB_FREELIST_HEAP_H
+#define LLVM_LIBC_SRC_STDLIB_FREELIST_HEAP_H
+
+#include <stddef.h>
+
+#include "block.h"
+#include "freelist.h"
+#include "src/__support/CPP/optional.h"
+#include "src/__support/CPP/span.h"
+#include "src/string/memcpy.h"
----------------
michaelrj-google wrote:
internal functions aren't allowed to call public libc functions. These includes should be replaced by `#include "src/string/memory_utils/inline_memcpy.h"` and `memset`, then the calls should be `inline_memcpy` and `inline_memset`.
https://github.com/llvm/llvm-project/pull/95066
More information about the libc-commits
mailing list