When I allocate memory from the heap and don't free it (by accident most likely!), are those memories freed up automatically by the os when the program quits?
Something like this
#include <stdio.h>
#include <stdlib.h>
int main()
{
int *m = malloc(100);
printf("%p", m);
return 0;
}
What happens to those 100 allocated bytes when the program quits the main?