I had a question regarding malloc() and free().
If a function looks like this for example:
void function( void )
ptr = malloc(100);
strcpy(ptr, "Test pointer\n");
Now this function doesn't really do anything except allocates the memory and frees it but my question is, will this function use up more and more memory as it is called by the program or will it all be freed?