diff options
author | Daan Leijen <daan@microsoft.com> | 2021-12-18 11:11:44 -0800 |
---|---|---|
committer | Daan Leijen <daan@microsoft.com> | 2021-12-18 11:11:44 -0800 |
commit | 89090510bd965ca48a83857eaa6b6e78a951bf7e (patch) | |
tree | 2801bb5229c37ce0e46c262c07d5acfba98bae89 /include | |
parent | 30a99e2c514b7f69b3224181b4d3877deffd824c (diff) |
update alignment tests
Diffstat (limited to 'include')
-rw-r--r-- | include/mimalloc-types.h | 2 | ||||
-rw-r--r-- | include/mimalloc.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/mimalloc-types.h b/include/mimalloc-types.h index d45a1ee..b349dfc 100644 --- a/include/mimalloc-types.h +++ b/include/mimalloc-types.h @@ -160,7 +160,7 @@ typedef int32_t mi_ssize_t; #if (MI_LARGE_OBJ_WSIZE_MAX >= 655360) #error "mimalloc internal: define more bins" #endif -#if (MI_ALIGNED_MAX > MI_SEGMENT_SIZE/2) +#if (MI_ALIGNMENT_MAX > MI_SEGMENT_SIZE/2) #error "mimalloc internal: the max aligned boundary is too large for the segment size" #endif diff --git a/include/mimalloc.h b/include/mimalloc.h index b65027d..a0b7138 100644 --- a/include/mimalloc.h +++ b/include/mimalloc.h @@ -166,7 +166,7 @@ mi_decl_export void mi_process_info(size_t* elapsed_msecs, size_t* user_msecs, s // Note that `alignment` always follows `size` for consistency with unaligned // allocation, but unfortunately this differs from `posix_memalign` and `aligned_alloc`. // ------------------------------------------------------------------------------------- -#define MI_ALIGNED_MAX (1024*1024UL) // maximum supported alignment is 1MiB +#define MI_ALIGNMENT_MAX (1024*1024UL) // maximum supported alignment is 1MiB mi_decl_nodiscard mi_decl_export mi_decl_restrict void* mi_malloc_aligned(size_t size, size_t alignment) mi_attr_noexcept mi_attr_malloc mi_attr_alloc_size(1) mi_attr_alloc_align(2); mi_decl_nodiscard mi_decl_export mi_decl_restrict void* mi_malloc_aligned_at(size_t size, size_t alignment, size_t offset) mi_attr_noexcept mi_attr_malloc mi_attr_alloc_size(1); |