ensure volatile declaration for abandoned_next field

This commit is contained in:
daan 2019-08-23 13:44:43 -07:00 committed by daan
parent 25ea9cf142
commit 15552eba79
3 changed files with 11 additions and 8 deletions

View file

@ -204,7 +204,7 @@ typedef enum mi_page_kind_e {
typedef struct mi_segment_s {
struct mi_segment_s* next;
struct mi_segment_s* prev;
struct mi_segment_s* abandoned_next;
volatile struct mi_segment_s* abandoned_next;
size_t abandoned; // abandoned pages (i.e. the original owning thread stopped) (`abandoned <= used`)
size_t used; // count of pages in use (`used <= capacity`)
size_t capacity; // count of available pages (`#free + used`)