News for hackers. Stuff that matters.
Re:Double-ended vector – is it useful? by viraptor on Monday May 23, 2016 @02:49AM (#11752334)
Familiarity / need I'd guess. I know this is possible. I also know how I'd do it on Linux, or where to start reading (mmap). But I have no idea how portable it is (does windows have mmap?) and unless I really need a structure that expands both ways, unless I know it's going to grow big, unless I can't estimate and preallocate it with some known capacity, unless I can't handle this using rebalancing tree, unless I really want to avoid copies, etc. I'm not going to implement it.

Even if all of those special cases apply, I'd first use dequeue or something ready and only reimplement it if it was too slow or take too much space in practice. We've got good-enough solutions for many cases. I'm ok with good-enough in many cases :)

Re:Double-ended vector – is it useful? by pjc50 on Monday May 23, 2016 @05:53AM (#11752823)
Between VirtualAlloc and MapViewOfFile, Windows has roughly equivalent functionality. Windows also separates out "reserve" and "commit" in the API.
Re:Double-ended vector – is it useful? by omgtehlion on Monday May 23, 2016 @02:58AM (#11752355)
Portable enough. I did this successfully on Windos and OSX (using mach calls)
Re:Double-ended vector – is it useful? by viraptor on Monday May 23, 2016 @03:06AM (#11752373)
I know it's possible to implement. By portable, I mean: is there a common interface for it. I'm guessing the answer is no if you mention specifically mach calls.