remap: refactoring and start on expandable

This commit is contained in:
daanx 2023-05-02 15:07:07 -07:00
parent 54dee434a3
commit ac21489ce7
8 changed files with 40 additions and 24 deletions

View file

@ -56,8 +56,6 @@ terms of the MIT license. A copy of the license can be found in the file
#include <pthread.h>
#endif
#define MI_PAGE_ALIGN_REMAPPABLE (1)
// "options.c"
void _mi_fputs(mi_output_fun* out, void* arg, const char* prefix, const char* message);
void _mi_fprintf(mi_output_fun* out, void* arg, const char* fmt, ...);

View file

@ -194,7 +194,13 @@ typedef int32_t mi_ssize_t;
#define MI_HUGE_BLOCK_SIZE ((uint32_t)MI_HUGE_OBJ_SIZE_MAX)
// Alignments over MI_ALIGNMENT_MAX are allocated in dedicated huge page segments
#define MI_ALIGNMENT_MAX (MI_SEGMENT_SIZE >> 1)
#define MI_ALIGN_HUGE (MI_SEGMENT_SIZE >> 1)
// We use special alignments internally to allocate remappable and expandable memory
#define MI_ALIGN_REMAP (MI_ALIGN_HUGE - 1)
#define MI_ALIGN_EXPAND_MAX (MI_ALIGN_HUGE - 2)
#define MI_ALIGN_EXPAND_MIN (1)
#define MI_EXPAND_INCREMENT (MI_MiB)
// ------------------------------------------------------