Kelemen Balazs wrote:
> with --leak-check=yes this leads to a definetely lost error:
>
> int main() {
> void* p = malloc(20);
> unsigned pAsUint = reinterpret_cast<unsigned>(p);
> p = 0;
> }
>
> Is this the expected behavior of valgrind?
You're missing a free() of the memory that you have malloced... if I add a free,
no memory is reported missing.
Just my few cents,
Mats Kindahl
--
Mats Kindahl
Senior Software Engineer
Database Technology Group
Sun Microsystems
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users