readerwriterqueue icon indicating copy to clipboard operation
readerwriterqueue copied to clipboard

Memory allocation

Open deng-chong opened this issue 1 year ago • 2 comments

Is the strategy of allocating memory the same as that of STL?

deng-chong avatar Aug 03 '23 07:08 deng-chong

It doesn't use standard allocators or throw std::bad_alloc if that's what you're asking, but you can customize the allocation through the traits. The default is malloc/free.

cameron314 avatar Aug 03 '23 11:08 cameron314

Oops, was thinking of my MPMC implementation. ReaderWriterQueue also uses malloc/free and does not throw std::bad_alloc, but provides no customization point for changing the allocation implementation.

cameron314 avatar Aug 04 '23 03:08 cameron314