[all-commits] [llvm/llvm-project] 3eebeb: [libc] Add aligned_alloc (#96586)
PiJoules via All-commits
all-commits at lists.llvm.org
Wed Jul 3 16:26:21 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3eebeb7e50c49ece2788ff4d5ffab5cc6c3da455
https://github.com/llvm/llvm-project/commit/3eebeb7e50c49ece2788ff4d5ffab5cc6c3da455
Author: PiJoules <6019989+PiJoules at users.noreply.github.com>
Date: 2024-07-03 (Wed, 03 Jul 2024)
Changed paths:
M libc/src/__support/block.h
M libc/src/__support/freelist.h
M libc/src/__support/freelist_heap.h
A libc/src/stdlib/aligned_alloc.h
M libc/src/stdlib/freelist_malloc.cpp
M libc/test/src/__support/CMakeLists.txt
M libc/test/src/__support/block_test.cpp
M libc/test/src/__support/freelist_heap_test.cpp
M libc/test/src/__support/freelist_malloc_test.cpp
Log Message:
-----------
[libc] Add aligned_alloc (#96586)
This adds support for aligned_alloc with the freelist allocator. This
works by finding blocks large enough to hold the requested size plus
some shift amount that's at most the requested alignment. Blocks that
meet this requirement but aren't properly aligned can be split such that
the usable_space of a new block is aligned properly. The "padding" block
created will be merged with the previous block if one exists.
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