mozilla/rust — Issue #1753: vec::reserve should reserve the exact amount requested
Author: brson
Created: 2012-02-04 08:41:40+00:00
State: open
Labels: easy, lib

This function currently reserves to the next power of two. This makes since during compiler push operations, but the library function is typically called when the final size of the vector is known. Even when that assumption isn't correct we'll end up allocating to the next power of two on the next push.