[all-commits] [llvm/llvm-project] 005758: [libc][stdlib] Make the FreeListHeap constant-init...

PiJoules via All-commits all-commits at lists.llvm.org
Fri Jun 14 12:12:10 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 005758eb6b35aaf548c3a59da860ecd2465a73f0
      https://github.com/llvm/llvm-project/commit/005758eb6b35aaf548c3a59da860ecd2465a73f0
  Author: PiJoules <6019989+PiJoules at users.noreply.github.com>
  Date:   2024-06-14 (Fri, 14 Jun 2024)

  Changed paths:
    M libc/src/__support/fixedvector.h
    M libc/src/stdlib/CMakeLists.txt
    M libc/src/stdlib/block.h
    M libc/src/stdlib/freelist.h
    M libc/src/stdlib/freelist_heap.h
    A libc/src/stdlib/freelist_malloc.cpp
    A libc/src/stdlib/realloc.h
    M libc/test/src/stdlib/CMakeLists.txt
    M libc/test/src/stdlib/freelist_heap_test.cpp
    A libc/test/src/stdlib/freelist_malloc_test.cpp

  Log Message:
  -----------
  [libc][stdlib] Make the FreeListHeap constant-initializable (#95453)

This refactors some of the FreeListHeap, FreeList, and Block classes to
have constexpr ctors so we can constinit a global allocator that does
not require running some global function or global ctor to initialize.
This is needed to prevent worrying about initialization order and any
other module-ctor can invoke malloc without worry.



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