Free heap memory

Tags:

Answer: 1

11 hours ago

So I'm using Ubuntu for programming I use atom text editor with gcc compiler for C. I want to ask what will happen if I don't clear memory allocated by malloc or calloc? Will the OS take care of it or I have to clear it. In case I forgot.

Added by: Stuart Dicki

Answer: 2

32 hours ago

You will have to take care of freeing memory your self. C doesn't have automatic memory management like JAVA and others.

Allocated memory will be freed automatically when the process stops though.

But if you have a long running process, leaking memory by not free'ing it, can make your system run out of memory.

Popular Search

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 1 2 3 4 5 6 7 8 9