Apply UNW_ALIGN in a few places in src/mi/mempool.c that I missed in
commit c2f757418 ("Rename and share `ALIGN' macro from
_UCD_internal.h").
---
src/mi/mempool.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mi/mempool.c b/src/mi/mempool.c
index 5e42219..e567904 100644
--- a/src/mi/mempool.c
+++ b/src/mi/mempool.c
@@ -115,7 +115,7 @@ expand (struct mempool *pool)
GET_MEMORY (mem, size);
if (!mem)
{
- size = (pool->obj_size + pg_size - 1) & -pg_size;
+ size = UNW_ALIGN(pool->obj_size, pg_size);
GET_MEMORY (mem, size);
if (!mem)
{
@@ -149,7 +149,7 @@ mempool_init (struct mempool *pool, size_t obj_size, size_t
reserve)
pool->obj_size = obj_size;
pool->reserve = reserve;
- pool->chunk_size = (2*reserve*obj_size + pg_size - 1) & -pg_size;
+ pool->chunk_size = UNW_ALIGN(2*reserve*obj_size, pg_size);
expand (pool);
}
--
1.7.9.5
_______________________________________________
Libunwind-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/libunwind-devel