summaryrefslogtreecommitdiff
path: root/src/mi/mempool.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mi/mempool.c')
-rw-r--r--src/mi/mempool.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/mi/mempool.c b/src/mi/mempool.c
index dbc183fa..536b64e8 100644
--- a/src/mi/mempool.c
+++ b/src/mi/mempool.c
@@ -1,6 +1,6 @@
/* libunwind - a platform-independent unwind library
Copyright (C) 2002-2003, 2005 Hewlett-Packard Co
- Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
+ Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
This file is part of libunwind.
@@ -30,13 +30,13 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
* __BIGGEST_ALIGNMENT__, which is the largest alignment ever used for any data
* type on the target machine you are compiling for.'' */
#ifdef __BIGGEST_ALIGNMENT__
-# define MAX_ALIGN __BIGGEST_ALIGNMENT__
+# define MAX_ALIGN __BIGGEST_ALIGNMENT__
#else
/* Crude hack to check that MAX_ALIGN is power-of-two.
* sizeof(long double) = 12 on i386. */
-# define MAX_ALIGN_(n) (n < 8 ? 8 : \
- n < 16 ? 16 : n)
-# define MAX_ALIGN MAX_ALIGN_(sizeof (long double))
+# define MAX_ALIGN_(n) (n < 8 ? 8 : \
+ n < 16 ? 16 : n)
+# define MAX_ALIGN MAX_ALIGN_(sizeof (long double))
#endif
static char sos_memory[SOS_MEMORY_SIZE] ALIGNED(MAX_ALIGN);
@@ -64,9 +64,9 @@ sos_alloc (size_t size)
/* No assumptions about `sos_memory' alignment. */
if (sos_memory_freepos == 0)
{
- unsigned align = UNW_ALIGN((uintptr_t) &sos_memory[0], MAX_ALIGN)
- - (uintptr_t) &sos_memory[0];
- sos_memory_freepos = align;
+ unsigned align = UNW_ALIGN((uintptr_t) &sos_memory[0], MAX_ALIGN)
+ - (uintptr_t) &sos_memory[0];
+ sos_memory_freepos = align;
}
pos = sos_memory_freepos;
sos_memory_freepos += size;
@@ -114,11 +114,11 @@ expand (struct mempool *pool)
size = UNW_ALIGN(pool->obj_size, pg_size);
GET_MEMORY (mem, size);
if (!mem)
- {
- /* last chance: try to allocate one object from the SOS memory */
- size = pool->obj_size;
- mem = sos_alloc (size);
- }
+ {
+ /* last chance: try to allocate one object from the SOS memory */
+ size = pool->obj_size;
+ mem = sos_alloc (size);
+ }
}
add_memory (pool, mem, size, pool->obj_size);
}
@@ -140,7 +140,7 @@ mempool_init (struct mempool *pool, size_t obj_size, size_t reserve)
{
reserve = pg_size / obj_size / 4;
if (!reserve)
- reserve = 16;
+ reserve = 16;
}
pool->obj_size = obj_size;