Made alignment a template parameter.

This commit is contained in:
Matthew Parkinson
2019-01-18 17:00:10 +00:00
parent a62e77f930
commit c1e23c497f
2 changed files with 3 additions and 2 deletions

View File

@@ -68,7 +68,8 @@ namespace snmalloc
* Primitive allocator for structure that are required before
* the allocator can be running.
***/
void* alloc_chunk(size_t size, size_t alignment = 64)
template<size_t alignment = 64>
void* alloc_chunk(size_t size)
{
// Cache line align
size = bits::align_up(size, 64);