libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Libunwind-devel] [PATCH 10/57] Apply UNW_ALIGN more in src/mi/mempool.c


From: Tommi Rantala
Subject: [Libunwind-devel] [PATCH 10/57] Apply UNW_ALIGN more in src/mi/mempool.c
Date: Fri, 21 Sep 2012 14:11:11 +0300

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]