Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/tppm.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,9 @@ struct tppm* tppm_init(unsigned chunk_size, unsigned max_age)
return NULL;
const size_t bufsize = chunk_size * sizeof(*tppm->buffer);
#ifdef HAVE__ALIGNED_MALLOC
tppm->buffer = _aligned_malloc(32, (bufsize + 31) & ~0x1f);
/* _aligned_malloc() takes (size, alignment), the reverse of C11
* aligned_alloc(alignment, size). */
tppm->buffer = _aligned_malloc((bufsize + 31) & ~0x1f, 32);
#else
tppm->buffer = aligned_alloc(32, (bufsize + 31) & ~0x1f);
#endif
Expand Down