mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-01 17:24:38 +03:00
fix compile error for mi_decl_nodiscard
This commit is contained in:
parent
d8321f6d66
commit
2ce6568af6
2 changed files with 4 additions and 4 deletions
|
@ -1902,7 +1902,7 @@ static bool mi_arena_page_register(size_t slice_index, size_t slice_count, mi_ar
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static mi_decl_nodiscard bool mi_arena_pages_reregister(mi_arena_t* arena) {
|
mi_decl_nodiscard static bool mi_arena_pages_reregister(mi_arena_t* arena) {
|
||||||
return _mi_bitmap_forall_set(arena->pages, &mi_arena_page_register, arena, NULL);
|
return _mi_bitmap_forall_set(arena->pages, &mi_arena_page_register, arena, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ static mi_memid_t mi_page_map_memid;
|
||||||
#define MI_PAGE_MAP_ENTRIES_PER_COMMIT_BIT MI_ARENA_SLICE_SIZE
|
#define MI_PAGE_MAP_ENTRIES_PER_COMMIT_BIT MI_ARENA_SLICE_SIZE
|
||||||
static mi_bitmap_t* mi_page_map_commit; // one bit per committed 64 KiB entries
|
static mi_bitmap_t* mi_page_map_commit; // one bit per committed 64 KiB entries
|
||||||
|
|
||||||
static mi_decl_nodiscard bool mi_page_map_ensure_committed(size_t idx, size_t slice_count);
|
mi_decl_nodiscard static bool mi_page_map_ensure_committed(size_t idx, size_t slice_count);
|
||||||
|
|
||||||
bool _mi_page_map_init(void) {
|
bool _mi_page_map_init(void) {
|
||||||
size_t vbits = (size_t)mi_option_get_clamp(mi_option_max_vabits, 0, MI_SIZE_BITS);
|
size_t vbits = (size_t)mi_option_get_clamp(mi_option_max_vabits, 0, MI_SIZE_BITS);
|
||||||
|
@ -203,8 +203,8 @@ static mi_memid_t mi_page_map_memid;
|
||||||
// divide the main map in 64 (`MI_BFIELD_BITS`) parts commit those parts on demand
|
// divide the main map in 64 (`MI_BFIELD_BITS`) parts commit those parts on demand
|
||||||
static _Atomic(mi_bfield_t) mi_page_map_commit;
|
static _Atomic(mi_bfield_t) mi_page_map_commit;
|
||||||
|
|
||||||
static mi_decl_nodiscard bool mi_page_map_ensure_committed(size_t idx, mi_submap_t* submap);
|
mi_decl_nodiscard static bool mi_page_map_ensure_committed(size_t idx, mi_submap_t* submap);
|
||||||
static mi_decl_nodiscard bool mi_page_map_ensure_submap_at(size_t idx, mi_submap_t* submap);
|
mi_decl_nodiscard static bool mi_page_map_ensure_submap_at(size_t idx, mi_submap_t* submap);
|
||||||
static bool mi_page_map_set_range(mi_page_t* page, size_t idx, size_t sub_idx, size_t slice_count);
|
static bool mi_page_map_set_range(mi_page_t* page, size_t idx, size_t sub_idx, size_t slice_count);
|
||||||
|
|
||||||
static inline bool mi_page_map_is_committed(size_t idx, size_t* pbit_idx) {
|
static inline bool mi_page_map_is_committed(size_t idx, size_t* pbit_idx) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue