[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [valgrind] [Bug 392855] valgrind reports 1 additional allocation and 1024 additional bytes allocated
From:       Tom Hughes <bugzilla_noreply () kde ! org>
Date:       2018-04-30 20:29:01
Message-ID: bug-392855-17878-NRmGoUqmu2 () http ! bugs ! kde ! org/
[Download RAW message or body]

https://bugs.kde.org/show_bug.cgi?id=392855

Tom Hughes <tom@compton.nu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |INVALID

--- Comment #4 from Tom Hughes <tom@compton.nu> ---
All that's happened in the second case is that gcc has optimised out the whole
thing as the nonsense that it is - it just puts 5 straight in the argument
register and passes it to printf. That's what happens when you compile with
optimisation.

So in the first case what you are seeing is your malloc, and in the second your
malloc never happens but something else (likely the dynamic linker or C library
run time) does do a 1024 byte malloc.

-- 
You are receiving this mail because:
You are watching all bug changes.=
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic