https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90634
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED Target Milestone|--- |9.0 --- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- The 813 bytes seen with GCC 8.x is due to reallocations within std::vector, as the sequence of path objects in [begin(),end()) is populated. The new code counts the number of components first, so there's no need to keep growing as the path is parsed. The sequence no longer uses std::vector at all, which also reduces sizeof(path). I'm not sure where the repeated 72 allocations come from, and can't check the code right now, but the new code doesn't do it anyway. I think this can be considered fixed.