Blocks :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
The PtrQueue class provides a free list for recycling buffers that have been used and processed. This free list is presently protected by a Mutex. Because the free list may need to be accessed as part of an Access barrier, the mutex must have "access" rank. This mutex can also be a significant source of contention. This free list could use a lock-free stack. The ABA problem for pop operations can be addressed by using GlobalCounter critical sections. A pop operation is performed within a critical section. A push operation first write_synchronizes then adds the buffer to the list. This puts any delays on the "GC" processing side of the free list, making the mutator pops to obtain buffers inexpensive.