[libc-commits] [libc] [libc] Add aligned_alloc (PR #96586)

Paul Kirth via libc-commits libc-commits at lists.llvm.org
Thu Jun 27 14:33:30 PDT 2024


================
@@ -47,10 +48,16 @@ TEST_FOR_EACH_ALLOCATOR(CanAllocate, 2048) {
   void *ptr = allocator.allocate(ALLOC_SIZE);
 
   ASSERT_NE(ptr, static_cast<void *>(nullptr));
-  // In this case, the allocator should be returning us the start of the chunk.
-  EXPECT_EQ(ptr, static_cast<void *>(
-                     reinterpret_cast<cpp::byte *>(allocator.region_start()) +
-                     FreeListHeap<>::BlockType::BLOCK_OVERHEAD));
----------------
ilovepi wrote:

OK, so we're in the scenario, where you don't think the test was valuable. Thanks for the clarification. I was operating under the impression, that the test was viewed as useful, but not stable enough to keep.

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


More information about the libc-commits mailing list