mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-06 15:29:31 +03:00
move declaration to avoid gcc warning, see issue #919
This commit is contained in:
parent
349b7dc2f4
commit
01503df7f3
1 changed files with 2 additions and 2 deletions
|
@ -663,7 +663,6 @@ static void mi_segment_span_remove_from_queue(mi_slice_t* slice, mi_segments_tld
|
||||||
static mi_slice_t* mi_segment_span_free_coalesce(mi_slice_t* slice, mi_segments_tld_t* tld) {
|
static mi_slice_t* mi_segment_span_free_coalesce(mi_slice_t* slice, mi_segments_tld_t* tld) {
|
||||||
mi_assert_internal(slice != NULL && slice->slice_count > 0 && slice->slice_offset == 0);
|
mi_assert_internal(slice != NULL && slice->slice_count > 0 && slice->slice_offset == 0);
|
||||||
mi_segment_t* const segment = _mi_ptr_segment(slice);
|
mi_segment_t* const segment = _mi_ptr_segment(slice);
|
||||||
const bool is_abandoned = (segment->thread_id == 0); // mi_segment_is_abandoned(segment);
|
|
||||||
|
|
||||||
// for huge pages, just mark as free but don't add to the queues
|
// for huge pages, just mark as free but don't add to the queues
|
||||||
if (segment->kind == MI_SEGMENT_HUGE) {
|
if (segment->kind == MI_SEGMENT_HUGE) {
|
||||||
|
@ -676,6 +675,7 @@ static mi_slice_t* mi_segment_span_free_coalesce(mi_slice_t* slice, mi_segments_
|
||||||
}
|
}
|
||||||
|
|
||||||
// otherwise coalesce the span and add to the free span queues
|
// otherwise coalesce the span and add to the free span queues
|
||||||
|
const bool is_abandoned = (segment->thread_id == 0); // mi_segment_is_abandoned(segment);
|
||||||
size_t slice_count = slice->slice_count;
|
size_t slice_count = slice->slice_count;
|
||||||
mi_slice_t* next = slice + slice->slice_count;
|
mi_slice_t* next = slice + slice->slice_count;
|
||||||
mi_assert_internal(next <= mi_segment_slices_end(segment));
|
mi_assert_internal(next <= mi_segment_slices_end(segment));
|
||||||
|
|
Loading…
Add table
Reference in a new issue