summaryrefslogtreecommitdiffstats
path: root/build/has/aligned-alloc.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-10-29 14:37:19 -0400
committerTavian Barnes <tavianator@tavianator.com>2024-11-02 11:25:10 -0400
commitc90d4af8750bef77ce9abe91df80d5d98ba297d7 (patch)
tree2e3213be7021b2be425954e33b34ea228f0d9f85 /build/has/aligned-alloc.c
parentb00341a45238d383fa27289a53798eef856092bb (diff)
downloadbfs-c90d4af8750bef77ce9abe91df80d5d98ba297d7.tar.xz
alloc: Don't require size % align == 0
Allowing unaligned sizes will allow us to allocate aligned slabs with additional metadata in the tail without ballooning the allocation size for large alignments. Link: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2244.htm#dr_460 Link: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2072.htm
Diffstat (limited to 'build/has/aligned-alloc.c')
-rw-r--r--build/has/aligned-alloc.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/build/has/aligned-alloc.c b/build/has/aligned-alloc.c
deleted file mode 100644
index 4460038..0000000
--- a/build/has/aligned-alloc.c
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright © Tavian Barnes <tavianator@tavianator.com>
-// SPDX-License-Identifier: 0BSD
-
-#include <stdlib.h>
-
-int main(void) {
- return !aligned_alloc(_Alignof(void *), sizeof(void *));
-}