Quote:I just as of yesterday installed Ubuntu(terminal) on my windows computer. In addition, when ahead and installed Valgrind, "sudo apt install Valgrind", to test everything out I went ahead and create a c++ hello world program. Then tested it with Valgrind. The Valgrind said I had about "72,704 bytes in 1 block". Further research, I performed suggested this was a bug of Valgrind with the c++ standard library functions, possible the iostream. My question is how do I go about fixing this bug. I can't ignore because if I am working on programs I need to able to accurately gauge where it's coming from. If anyone can provide a step by step solution for my problem in layman's term for the problem it would be invaluable. here is my code and errors I get:
#include <iostream> using std::cout; using std endl; int main(){ cout << "hello world" <<endl; }
==175== Memcheck, a memory error detector ==175== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al. ==175== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info ==175== Command: ./helloworld ==175== Hello World ==175== ==175== HEAP SUMMARY: ==175== in use at exit: 72,704 bytes in 1 blocks ==175== total heap usage: 2 allocs, 1 frees, 76,800 bytes allocated ==175== ==175== LEAK SUMMARY: ==175== definitely lost: 0 bytes in 0 blocks ==175== indirectly lost: 0 bytes in 0 blocks ==175== possibly lost: 0 bytes in 0 blocks ==175== still reachable: 72,704 bytes in 1 blocks ==175== suppressed: 0 bytes in 0 blocks ==175== Rerun with --leak-check=full to see details of leaked memory ==175== ==175== For counts of detected and suppressed errors, rerun with: -v ==175== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)