[all-commits] [llvm/llvm-project] 2396c4: [libc] Add malloc.h header defining mallopt (#110908)

fabio-d via All-commits all-commits at lists.llvm.org
Thu Oct 3 09:46:03 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2396c469994e094f7a146f4fa9f29990904ed73b
      https://github.com/llvm/llvm-project/commit/2396c469994e094f7a146f4fa9f29990904ed73b
  Author: Fabio D'Urso <fdurso at google.com>
  Date:   2024-10-03 (Thu, 03 Oct 2024)

  Changed paths:
    M libc/config/linux/aarch64/entrypoints.txt
    M libc/config/linux/aarch64/headers.txt
    M libc/config/linux/arm/entrypoints.txt
    M libc/config/linux/arm/headers.txt
    M libc/config/linux/riscv/entrypoints.txt
    M libc/config/linux/riscv/headers.txt
    M libc/config/linux/x86_64/entrypoints.txt
    M libc/config/linux/x86_64/headers.txt
    M libc/include/CMakeLists.txt
    M libc/include/llvm-libc-macros/CMakeLists.txt
    A libc/include/llvm-libc-macros/malloc-macros.h
    A libc/include/malloc.h.def
    A libc/newhdrgen/yaml/malloc.yaml
    M libc/spec/gnu_ext.td
    M libc/src/stdlib/CMakeLists.txt

  Log Message:
  -----------
  [libc] Add malloc.h header defining mallopt (#110908)

This patch adds the malloc.h header, declaring Scudo's mallopt
entrypoint when built LLVM_LIBC_INCLUDE_SCUDO, as well as two
constants that can be passed to it (M_PURGE and M_PURGE_ALL).

Due to limitations of the current build system, only the declaration
of mallopt is gated by LLVM_LIBC_INCLUDE_SCUDO, and the two new
constants are defined irrespectively of it. We may need to refine
this in the future.

Note that some allocators other than Scudo may offer a mallopt
implementation too (e.g. man 3 mallopt), albeit with different
supported input values. This patch only supports the specific case of
LLVM_LIBC_INCLUDE_SCUDO.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list