News for hackers. Stuff that matters.
Re:C++ Core Coroutines Proposal [pdf] by vardump on Friday September 21, 2018 @08:41AM (#18039234)
Yeah, but I'm not entirely clear how I'd for example get std::vector to use a mmap'ed range, that I could zero-copy grow.

Also in that case I might want to grow it by a fixed amount, once it grows past a certain threshold.

It's a shame one needs to write another vector implementation just for that.

Re:C++ Core Coroutines Proposal [pdf] by ChrisSD on Friday September 21, 2018 @08:46AM (#18039266)
Why wouldn't writing an allocator class be enough for mmap?
Re:C++ Core Coroutines Proposal [pdf] by BeeOnRope on Friday September 21, 2018 @12:21PM (#18040769)
Probably not, because the allocators don't expose the "extend" or "realloc" concept, so all you'll see from within your allocator is a request for an entire new region that vector wants in order to copy the new stuff into.

To implement a growing allocation , you'll have to create a custom vector, pretty much.

Re:C++ Core Coroutines Proposal [pdf] by Timmah on Friday September 21, 2018 @12:19PM (#18040755)
How would you ensure nothing was used in the region after the original allocation?