m_mallocfree.c: generalise 'reclaimSuperBlock' to also reclaim
splittable superblocks. Bug #282105.
(Philippe Waroquiers, philippe.waroquiers@skynet.be)
A previous patch (bug 250101) introduced the concept of reclaimable
superblock: a superblock that cannot be splitted in smaller blocks
and that can be munmapped.
This patch generalises the reclaimable concept : all superblocks are
now reclaimable. To reduce fragmentation, big superblocks are still
kept unsplittable.
The patch has 4 aspects:
1 The previous concept of 'reclaimable superblock' is renamed
'unsplittable superblock' (this is a mechanical change).
2 Ensure that splittable blocks can be reclaimed :
After each free, if the free results in a merged block which
completely covers the superblock, then the superblock can be reclaimed.
3 If a superblock is reclaimed and there exists some translations
for this superblock then discard the translations.
Note : I did not understand the comment speaking about
circular dependency. Just calling VG_(discard_translations) seems
to cause no problem. As m_transtab.c does not allocate client memory,
I believe no circular (dynamic) dependency can be done.
4 Activate 'unsplittable superblock' for all arenas.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12047 a5019735-40e9-0310-863c-91ae7b9d1cf9
1 file changed