if memory leaks happens...

Started by
12 comments, last by Fish HF 19 years, 11 months ago
Do you guys know what happens when a program leaks memory, will the 9x kernel and the NT kernel recover the memory back? thanks
Advertisement
Nope. You''ll have to do a restart. If you create dynamic memory in C++ and then not release it back to the OS, the OS will forever think you are still using it until you release it explicitly. In other words, if you have a memory leak you''ll have to restart for it to be reclaimed.
Well, R2D22U2..
That''s true with Win98, but not with Win2K/WinXP. After the process is killed, they''re much better at cleaning up after you (they are modern kernels, not that DOS garbage). That''s not a license to leak memory, but it''s comforting to know that your application won''t steal the systems memory forever and ever.
Thanks for the replies, that makes me feel better :D, cuz many libraries seems to leak memory
Both the win 9x kernel, and NT kernel, recovers the memory when the application closes. But not as long as it''s running.
I stand corrected then.
Well, R2D22U2..
it seems wind0ws 9x isn''t that bad at all lol
quote:Original post by Fish HF
it seems wind0ws 9x isn''t that bad at all lol


The problem with the windows 9x memory management, is it''s caching system. It caches a lot of resources, in case they are needed later, usually doing it too much, that there''s no memory left for the program, or that the system gets unstable...

There might also be bugs in the memory cleanup system, but it''s supposed to work at least in teory.

Hmm, my college profs always said that 9x is unable to clean up leaked memory. Anyone with Win9x want to see if that''s the case?
--God has paid us the intolerable compliment of loving us, in the deepest, most tragic, most inexorable sense.- C.S. Lewis
quote:Original post by antareus
Hmm, my college profs always said that 9x is unable to clean up leaked memory. Anyone with Win9x want to see if that''s the case?


He probably said it to make you avoid memory leaks at all cost

This topic is closed to new replies.

Advertisement