Repository: trafficserver Updated Branches: refs/heads/master 32f71df3a -> 2e55f1b8e
TS-2735: Use INK_ALIGN macro to make things clear Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/2e55f1b8 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/2e55f1b8 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/2e55f1b8 Branch: refs/heads/master Commit: 2e55f1b8e501f17acbd00ae88999711e85dbd385 Parents: 32f71df Author: Phil Sorber <[email protected]> Authored: Mon Apr 21 15:35:26 2014 -0600 Committer: Phil Sorber <[email protected]> Committed: Mon Apr 21 15:35:26 2014 -0600 ---------------------------------------------------------------------- lib/ts/ink_queue.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2e55f1b8/lib/ts/ink_queue.cc ---------------------------------------------------------------------- diff --git a/lib/ts/ink_queue.cc b/lib/ts/ink_queue.cc index 7f5c172..dfa68e6 100644 --- a/lib/ts/ink_queue.cc +++ b/lib/ts/ink_queue.cc @@ -49,7 +49,7 @@ #include "ink_error.h" #include "ink_assert.h" #include "ink_queue_ext.h" - +#include "ink_align.h" inkcoreapi volatile int64_t fastalloc_mem_in_use = 0; inkcoreapi volatile int64_t fastalloc_mem_total = 0; @@ -104,7 +104,7 @@ ink_freelist_init(InkFreeList **fl, const char *name, uint32_t type_size, f->alignment = alignment; f->chunk_size = chunk_size; // Make sure we align *all* the objects in the allocation, not just the first one - f->type_size = (type_size + (alignment - 1)) & ~(alignment - 1); + f->type_size = INK_ALIGN(type_size, alignment); SET_FREELIST_POINTER_VERSION(f->head, FROM_PTR(0), 0); f->used = 0;
