]> git.ipfire.org Git - thirdparty/valgrind.git/commit
Small optimisation in helgrind address description
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Sat, 4 Nov 2017 07:32:03 +0000 (08:32 +0100)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Sat, 4 Nov 2017 07:32:03 +0000 (08:32 +0100)
commit1eb5ea2afed92e38a15159cdef559785166a02a9
treec9292e09cd9106301c2c21b6cbf622099bf544ba
parent95038d380d60e7af2d04ffdd8432fdebed1990aa
Small optimisation in helgrind address description

Searching if an addr is in a malloc-ed client block is expensive (linear search)
So, before scanning the list of malloc block, check that the address is
in a client heap segment : this is a fast operation (it has a small
cache, and for cache miss, does a dichotomic search) and avoids
scanning a often big list (for big applications).
helgrind/hg_main.c