mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 11:34:38 +03:00
fix thread-id reset on page abandonment
This commit is contained in:
parent
b005f7cdbf
commit
cc6d14c55b
3 changed files with 19 additions and 4 deletions
|
@ -325,7 +325,13 @@ static inline uintptr_t mi_page_thread_id(const mi_page_t* page) {
|
|||
}
|
||||
|
||||
static inline void mi_page_init_flags(mi_page_t* page, uintptr_t thread_id) {
|
||||
page->flags = thread_id;
|
||||
mi_assert_internal((thread_id & MI_PAGE_FLAGS_MASK) == 0);
|
||||
page->flags = thread_id;
|
||||
}
|
||||
|
||||
static inline void mi_page_set_thread_id(mi_page_t* page, uintptr_t thread_id) {
|
||||
mi_assert_internal((thread_id & MI_PAGE_FLAGS_MASK) == 0);
|
||||
page->flags = thread_id | (page->flags & MI_PAGE_FLAGS_MASK);
|
||||
}
|
||||
|
||||
static inline bool mi_page_is_in_full(const mi_page_t* page) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue