From: Steven Ross (spreadsort_at_[hidden])
Date: 2008-07-11 15:36:27
On Fri, Jul 11, 2008 at 10:43 AM, Phil Endecott <
> Are you certain that resizing the bins_cache vector when you do is safe,
> from the point of view of subsequent iterations of the loop which continue
> to use a pointer to the first element from before the resize()?
Oops. Good point. The bins pointer is no longer safe as soon as a
recursive call is made; it didn't crash because reallocs didn't change the
vector location. I should use the vector (which will stay valid) when I
start making recursive calls, not the bins pointer, and the performance
impact should be trivial, as that's a loop over the bins (n/512), not all
items as the other loops are. I'll fix that.
I'll also fix the minor syntax issues you and David pointed out. Anything
Boost list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk