Add ownership checkings for FlagLock under debug (#432)
* add ownership checkings for FlagLock under debug Signed-off-by: SchrodingerZhu <i@zhuyi.fan> * fix owner reset ordering Signed-off-by: SchrodingerZhu <i@zhuyi.fan> * addresss CR Signed-off-by: SchrodingerZhu <i@zhuyi.fan> * fix include and constexpr problem Signed-off-by: SchrodingerZhu <i@zhuyi.fan> * use thread_local variable as thread identity Signed-off-by: SchrodingerZhu <i@zhuyi.fan> * change default form for initialization Signed-off-by: SchrodingerZhu <i@zhuyi.fan> * address CR Signed-off-by: SchrodingerZhu <i@zhuyi.fan> * fix typo and format Signed-off-by: SchrodingerZhu <i@zhuyi.fan> * add more assertions Signed-off-by: SchrodingerZhu <i@zhuyi.fan> * adjust flag lock and comments Signed-off-by: SchrodingerZhu <i@zhuyi.fan> * address CR Signed-off-by: SchrodingerZhu <i@zhuyi.fan>
This commit is contained in:
committed by
GitHub
parent
b1da339b3e
commit
9b548ed3a2
@@ -29,7 +29,7 @@ namespace snmalloc
|
||||
|
||||
private:
|
||||
MPMCStack<T, PreZeroed> stack;
|
||||
std::atomic_flag lock = ATOMIC_FLAG_INIT;
|
||||
FlagWord lock{};
|
||||
T* list{nullptr};
|
||||
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user