A bunch more work sorting out type and variable names.
Added a query for number of elements to each data structure. Need to add a config option to turn off keeping track of the count, since it requires an atomic increment, which is expensive if you don’t need it.
Thinking the way to stop the ringbuffer queue using malloc is to generally allow a data structure instance to support custom malloc() and free(), which is to say, to allow the user to specify a function call for those functions.
Normally it will be malloc() and free(), but it could just as well be calls to something which pops/pushes from a freelist. You could see this being useful if you have for example a queue and you know the maximum number of elements is bound (which in fact is the exact use case for the ringbuffer).
I’m also thinking I should return to the code base the original contigious double-word CAS based data structures. The reason for this is that they work on Intel and ARM, which is a wide user base, while avoiding SMR, where SMR sooner or later (or every time like now) will have to call malloc().
For people doing real time sensitive work (audio) you can’t call malloc(), which makes the SMR stuff unhelpful.
This Thursday is a holiday and I’m taking Friday off as well. I’m hoping by the end of the weekend to have the next release out; that will depend on how problematic this current freelist/SMR bug turns out to be.