Use unsigned
for bit-field variables
It is actually non-standard to use `bool` with a bit-field quantifier, and VS 2019 complains about this. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
parent
f3a162f095
commit
e747a6f3a6
@ -136,8 +136,8 @@ typedef union mi_page_flags_u {
|
||||
uint16_t value;
|
||||
uint8_t full_aligned;
|
||||
struct {
|
||||
bool in_full:1;
|
||||
bool has_aligned:1;
|
||||
unsigned in_full:1;
|
||||
unsigned has_aligned:1;
|
||||
bool is_zero; // `true` if the blocks in the free list are zero initialized
|
||||
};
|
||||
} mi_page_flags_t;
|
||||
@ -167,10 +167,10 @@ typedef uintptr_t mi_thread_free_t;
|
||||
typedef struct mi_page_s {
|
||||
// "owned" by the segment
|
||||
uint8_t segment_idx; // index in the segment `pages` array, `page == &segment->pages[page->segment_idx]`
|
||||
bool segment_in_use:1; // `true` if the segment allocated this page
|
||||
bool is_reset:1; // `true` if the page memory was reset
|
||||
bool is_committed:1; // `true` if the page virtual memory is committed
|
||||
bool is_zero_init:1; // `true` if the page was zero initialized
|
||||
unsigned segment_in_use:1; // `true` if the segment allocated this page
|
||||
unsigned is_reset:1; // `true` if the page memory was reset
|
||||
unsigned is_committed:1; // `true` if the page virtual memory is committed
|
||||
unsigned is_zero_init:1; // `true` if the page was zero initialized
|
||||
|
||||
// layout like this to optimize access in `mi_malloc` and `mi_free`
|
||||
uint16_t capacity; // number of blocks committed, must be the first field, see `segment.c:page_clear`
|
||||
|
Loading…
x
Reference in New Issue
Block a user