aboutsummaryrefslogtreecommitdiffstats
path: root/enmalloc.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2018-09-02 15:32:56 +0200
committerMattias Andrée <maandree@kth.se>2018-09-02 15:32:56 +0200
commit47128b7def4954c4cf544924c94f018d88033374 (patch)
treec75e6c76c078a095ff691d42a1f0b2d0ea0f0357 /enmalloc.c
parentAdd malloc function attribute were appropriate (diff)
downloadlibsimple-47128b7def4954c4cf544924c94f018d88033374.tar.gz
libsimple-47128b7def4954c4cf544924c94f018d88033374.tar.bz2
libsimple-47128b7def4954c4cf544924c94f018d88033374.tar.xz
misc
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--enmalloc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/enmalloc.c b/enmalloc.c
index edf4b5e..0da7c33 100644
--- a/enmalloc.c
+++ b/enmalloc.c
@@ -27,6 +27,7 @@ main(void)
assert((info = get_allocinfo(ptr)));
assert(info->size == 5);
assert(!info->zeroed);
+ assert(!((uintptr_t)ptr % (uintptr_t)(info->alignment)));
}
free(ptr);
@@ -35,6 +36,7 @@ main(void)
assert((info = get_allocinfo(ptr)));
assert(info->size == 4);
assert(!info->zeroed);
+ assert(!((uintptr_t)ptr % (uintptr_t)(info->alignment)));
}
free(ptr);