Running valgrind on your program produces the following outp
Running valgrind on your program produces the following output: 24 bytes in 1 blocks are definitely lost. State a reason for this error (don’t worry about getting specific with the bytes-just give reasons).
Solution
Valgrind is a programming tool for memory debugging,memory leak detection and profiling.Valgrind is in essence a virtual machine using just-in-time(JIT) compilation techniques, incluing dynamic recompilation.
Output:\"24 bytes in 1 blocks are definately lost\"
The reason for this error is
at at 0x1B904984: malloc (vg_replace_malloc.c:131)
by 0x50B0A2: (within /usr/lib/libgssapi_krb5.so.2.2)
by 0x6453FB: krb5_mk_req_extended (in /usr/lib/libkrb5.so.3.2)
by 0x50C168: krb5_gss_init_sec_context (in /usr/lib/libgssapi_krb5.so.2.2)
by 0x50F714: gss_init_sec_context (in /usr/lib/libgssapi_krb5.so.2.2)
by 0x1BD2FF39: (within /usr/lib/sasl2/libgssapiv2.so.2.0.19)
by 0x3AEBED: sasl_client_step (in /usr/lib/libsasl2.so.2.0.19)
by 0x3AF0B8: sasl_client_start (in /usr/lib/libsasl2.so.2.0.19)
by 0x491B69: ldap_int_sasl_bind (in /usr/lib/libldap- 2.2.so.7.0.6)
by 0x494534: ldap_sasl_interactive_bind_s (in /usr/lib/libldap-2.2.so.7.0.6)
here valgrind designed to be as non-intrusive as possible.It works directly with existing executables.You don\'t need to recompile,relink or otherwise modify the program to be checked.
The most important option is ---tool which dictates which cValgrind tool to run.For example ,if want to run the command is -1 using the memory-checking tool Memcheck.Valgrind takes control of your program before it starts.Debugging information is read from the executable and associated libraries, so that error messages and other outputs can be phrased in terms of source code locations.
