simplified aligned allocation; improved codegen; fix mi_good_size with padding included; add MI_MAX_ALIGN_GUARANTEE

This commit is contained in:
Daan
2024-05-11 06:43:52 -07:00
parent c70c1df16a
commit 7128db7bba
7 changed files with 69 additions and 55 deletions

View File

@@ -200,6 +200,9 @@ typedef int32_t mi_ssize_t;
#error "mimalloc internal: define more bins"
#endif
// Maximum block size for which blocks are guarenteed to be block size aligned. (see `segment.c:_mi_segment_page_start`)
#define MI_MAX_ALIGN_GUARANTEE (MI_MEDIUM_OBJ_SIZE_MAX)
// Alignments over MI_BLOCK_ALIGNMENT_MAX are allocated in dedicated huge page segments
#define MI_BLOCK_ALIGNMENT_MAX (MI_SEGMENT_SIZE >> 1)