summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVicent Marti <vicent@github.com>2014-07-01 13:26:02 +0200
committerVicent Marti <vicent@github.com>2014-07-01 13:26:02 +0200
commit1453bd20897d074a3f65d86f0d2bbb72ed23d071 (patch)
tree666ed1f4a261a1323600810d1591461181a068f2 /src
parentdcdb8500e3bd719010a1a65fffc391eef23dd4b4 (diff)
parent5fa8cda981940eaef54b55abe4fcba09b4e18e12 (diff)
downloadlibgit2-1453bd20897d074a3f65d86f0d2bbb72ed23d071.tar.gz
Merge pull request #2451 from libgit2/rb/round-up-pool-allocations
Round up pool alloc sizes for alignment
Diffstat (limited to 'src')
-rw-r--r--src/pool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pool.c b/src/pool.c
index 146f118b4..a516ff9eb 100644
--- a/src/pool.c
+++ b/src/pool.c
@@ -146,7 +146,7 @@ GIT_INLINE(void) pool_remove_page(
void *git_pool_malloc(git_pool *pool, uint32_t items)
{
git_pool_page *scan = pool->open, *prev;
- uint32_t size = items * pool->item_size;
+ uint32_t size = ((items * pool->item_size) + 7) & ~7;
void *ptr = NULL;
pool->has_string_alloc = 0;