Trivial counter example of why that won't work.
int main ( int argc, char *argv[] ) {
int n;
int *p;
if ( argc <= 1 ) {
n = 10;
p = malloc( n * sizeof *p );
} else {
Type: Posts; User: Salem
Trivial counter example of why that won't work.
int main ( int argc, char *argv[] ) {
int n;
int *p;
if ( argc <= 1 ) {
n = 10;
p = malloc( n * sizeof *p );
} else {
Well valgrind is open source, so I suggest you get to it and start studying it thoroughly.
Well what you describe in a production scenario is Valgrind Home
But coming up with that for a school assignment is impractical.
A very simple memory tracker on the other hand is easy to...