Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Fish HF

if memory leaks happens...

This topic is 5170 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Do you guys know what happens when a program leaks memory, will the 9x kernel and the NT kernel recover the memory back? thanks

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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.

Share this post


Link to post
Share on other sites
Thanks for the replies, that makes me feel better :D, cuz many libraries seems to leak memory

Share this post


Link to post
Share on other sites
Both the win 9x kernel, and NT kernel, recovers the memory when the application closes. But not as long as it''s running.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!