On Sun, Feb 17, 2013 at 4:41 PM, Harry van Haaren wrote:
But you're not guaranteed to write that many bytes at a time. If the
write of a chunk of bytes (your event object) to a ringbuffer wraps,
you probably wind up with two writes. A read from another thread may
get an incomplete object. What happens then?
> I'm very interested in why copying C++ objects like this is a bad idea.
I did make a suggestion.
My suggestion has nothing to do with mem-pools or placement new. That
depends on your memory management strategy, which is orthogonal to