diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-06-01 17:14:56 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-06-01 17:14:56 +0100 |
commit | 0ea297d18f73e96247af1081993a05a36f75ccee (patch) | |
tree | 7d077d27a9296e7e733a61d3f8a9492eaee9e766 /src/libutil/mem_pool.h | |
parent | d2856373e18354a03d2f698ada27c5d6686cbb8c (diff) | |
download | rspamd-0ea297d18f73e96247af1081993a05a36f75ccee.tar.gz rspamd-0ea297d18f73e96247af1081993a05a36f75ccee.zip |
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.
Diffstat (limited to 'src/libutil/mem_pool.h')
-rw-r--r-- | src/libutil/mem_pool.h | 2 |
1 files changed, 1 insertions, 1 deletions
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)) |