commit | 804a78b84a95e77681cb21e4c4d0b0d76d2f5f39 | [log] [tgz] |
---|---|---|
author | sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> | Wed Feb 23 13:22:24 2011 +0000 |
committer | sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> | Wed Feb 23 13:22:24 2011 +0000 |
tree | 0930bf5ad51fe03b8af21e96c8e120882231c2f9 | |
parent | 7d1064a3902f14d3c864ecb2c7cdf12f357a2354 [diff] |
Add a new constructor for empty XArrays, VG_(newSizedXA). This is identical to VG_(newXA) but allows passing in a size hint. In the case where the likely final size of the XArray is known at creation time, this allows avoiding the repeated (implicit) resizing and copying of the array as elements are added, which can save a vast amount of dynamic memory allocation turnover. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11568 a5019735-40e9-0310-863c-91ae7b9d1cf9