From 0ea297d18f73e96247af1081993a05a36f75ccee Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 1 Jun 2015 17:14:56 +0100 Subject: [PATCH] Align pointers by 16 bytes boundary. Many operations on x86 are much faster if the pointers are aligned properly. Obviously, that would increase memory usage slightly, however, rspamd always prefers speed to compactness. --- src/libutil/mem_pool.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libutil/mem_pool.h b/src/libutil/mem_pool.h index 7e71925ce..1befd8445 100644 --- a/src/libutil/mem_pool.h +++ b/src/libutil/mem_pool.h @@ -19,7 +19,7 @@ struct f_str_s; -#define MEM_ALIGNMENT sizeof(unsigned long) /* platform word */ +#define MEM_ALIGNMENT 16 /* Better for SSE */ #define align_ptr(p, a) \ (guint8 *) (((uintptr_t) (p) + ((uintptr_t) a - 1)) & ~((uintptr_t) a - 1)) -- 2.39.5