Memory leak | Sololearn: Learn to code for FREE!


Memory leak

Let's say I have a recursive function in c/c++ program where I'm allocating MB's of memory and not freeing it. The program closes abruptly and the allocated memory is not freed. So my question is, is that memory remain unusable? If the run the program multiple times with result( program crashes resulting in memory leak), eventually will it cause OS crash??

6/13/2018 12:17:54 PM

Dilip Srinivas

1 Answer

New Answer


No... On common computer system this is managed by OS that make again "usable" this memory Note that i have simplify answer because much depend on OS that abstract you from many concepts in computer system (process managements, virtual memory etc)