[valgrind] [Bug 476535] Difference in allocation size for massif/tests/overloaded-new between clang++/libc++ and g++/libstdc++

2023-11-05 Thread Paul Floyd
https://bugs.kde.org/show_bug.cgi?id=476535

Paul Floyd  changed:

   What|Removed |Added

 Status|REPORTED|RESOLVED
 Resolution|--- |FIXED

--- Comment #2 from Paul Floyd  ---
commit d248a4830770160cc7062f32ec91933804fe401a
Author: Paul Floyd 
Date:   Sun Nov 5 13:35:01 2023 +0100

Bug 476535 - Difference in allocation size for massif/tests/overloaded-new
between clang++/libc++ and g++/libstdc++

In the end all I could do was filter the results.

libc++ and libstdc++ allocate different sizes of stuff for their own usr.
That means that when we get to allocating aligned blocks there is some
slop (up to the alignment size) that gets counted. And the amount of
that slop depends on the prior (internal) allocations.

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 476535] Difference in allocation size for massif/tests/overloaded-new between clang++/libc++ and g++/libstdc++

2023-11-04 Thread Paul Floyd
https://bugs.kde.org/show_bug.cgi?id=476535

--- Comment #1 from Paul Floyd  ---
So I think what happens is that arena_malloc allocates requested size +
alignment  + overhead

Then the small block up to the alignment boundary gets freed. Since the
alignment was added to the arena_malloc size then even in the worst case there
will be the original user requested size available.

That means that "extra-heap" is made up of overhead and slop from rounding up
the the alignment boundary.

And from what I see the slop depends on what was allocated previously. Since
libc++ and libstdc++ do different allocations the slop is different.

Conclusion: I need to filter the extra-heap for these aligned allocations.

-- 
You are receiving this mail because:
You are watching all bug changes.