N
Ning
I am really confused on freeing allocated memory before the
program exits.
7.24 of faq says that "A real operating system definitively
reclaims all memory when a program exits."
http://www.eskimo.com/~scs/C-faq/q7.24.html
So if I am writing a C program intended to be run in a
"real operating system", does the faq mean that I can write
code like this and still sleep peacefully in the night?
#include <stdlib.h>
int main()
{
int *p;
p = malloc(sizeof *p);
return(0);
}
program exits.
7.24 of faq says that "A real operating system definitively
reclaims all memory when a program exits."
http://www.eskimo.com/~scs/C-faq/q7.24.html
So if I am writing a C program intended to be run in a
"real operating system", does the faq mean that I can write
code like this and still sleep peacefully in the night?
#include <stdlib.h>
int main()
{
int *p;
p = malloc(sizeof *p);
return(0);
}