Previous | Next --- Slide 30 of 39
Back to Lecture Thumbnails
yey1

pop_count is just an integer, If we have a lot of pop operations, will pop_count overflow?

bpr

@yey1, yes it will. Its purpose in this code is just to provide a "unique" identifier to reduce the chance of the ABA problem. Using an int, we need to have 2^32 pop operations occur while one pop operation is swapped out and the top pointer be back to the same value before the context switch.