[libc-commits] [libc] [libc] add shrink in-place support for reallocations (PR #200272)

Daniel Thornburgh via libc-commits libc-commits at lists.llvm.org
Mon Jun 1 15:55:38 PDT 2026


================
@@ -421,7 +421,7 @@ Block::BlockInfo Block::allocate(Block *block, size_t alignment, size_t size) {
   }
 
   // Now get a block for the requested size.
-  if (optional<Block *> next = info.block->split(size))
+  if (optional<Block *> next = info.block->split(size, MIN_ALIGN))
----------------
mysterymath wrote:

This is the default; was this missed during some other cleanup? Or is there another reason to make this explicit?

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


More information about the libc-commits mailing list