]> git.ipfire.org Git - thirdparty/valgrind.git/commit
Add a new constructor for empty XArrays, VG_(newSizedXA). This is
authorJulian Seward <jseward@acm.org>
Wed, 23 Feb 2011 13:22:24 +0000 (13:22 +0000)
committerJulian Seward <jseward@acm.org>
Wed, 23 Feb 2011 13:22:24 +0000 (13:22 +0000)
commit0c2371837b4837ae8289f7ff91b607880690d59b
tree0930bf5ad51fe03b8af21e96c8e120882231c2f9
parent0e228dac5d8af23ad7850616d3560057b9c4ad95
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
coregrind/m_xarray.c
include/pub_tool_xarray.h