News for hackers. Stuff that matters.
Re:Joint Allocations in C++ by efaref on Monday September 14, 2015 @10:29AM (#10215220)
Rather than two pointers I would probably have pointer + len. Storing the length of your arbitrary memory block is no bad thing, imo.

In any case, having a sensible copy constructor on the memory_block (and any necessary associated data) would at least make the copy constructors in the client classes (assuming you have more than one user of this pattern) cleaner.

It's a really good pattern, though. Excellent blog post.

Re:Joint Allocations in C++ by quicknir on Monday September 14, 2015 @03:42PM (#10217027)
Thanks, I appreciate that. I welcome your feedback on the follow-up as well.