]> git.ipfire.org Git - thirdparty/valgrind.git/commit
Implement VG_(arena_realloc_shrink) similar to realloc, but can
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Mon, 30 Jun 2014 19:47:24 +0000 (19:47 +0000)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Mon, 30 Jun 2014 19:47:24 +0000 (19:47 +0000)
commitae7b27f7060bc0d0c5f547575cd59e1b9bb3b818
tree996e91293f36a22c608f619ff28fe7fa7f2f91e1
parent3aa62684fd807cb44a2e7f8f01f9840a3483379e
Implement VG_(arena_realloc_shrink) similar to realloc, but can
only decrease the size of a block, does not change the address,
does not need to alloc another block and copy the memory,
and (if big enough) makes the excess memory available for other
allocations.

VG_(arena_realloc_shrink) is then used for debuginfo storage.c
(replacing an allocation + copy).
Also use it in the dedup pool, to recuperate the unused
memory of the last pool.
This also allows to re-increase the string pool size to the original
3.9.0 value of 64Kb. All this slightly decrease the peak and in use
memory of dinfo.

VG_(arena_realloc_shrink) will also be used to implement (in another patch)
a dedup pool which "numbers" the allocated elements.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14122
coregrind/m_debuginfo/misc.c
coregrind/m_debuginfo/priv_misc.h
coregrind/m_debuginfo/priv_storage.h
coregrind/m_debuginfo/storage.c
coregrind/m_deduppoolalloc.c
coregrind/m_mallocfree.c
coregrind/pub_core_mallocfree.h
include/pub_tool_deduppoolalloc.h