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
2 files changed