• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 259
  • Last Modified:

Memory damage

Hello experts.
I am curious about the possible long term effects on memory. How much damage can be done by c++ using dynamic memory? I understand that there can be memory leaks using new and malloc if not freed but that doesn't seem long term. That can be fixed by a basic reboot, correct? Is it possible to do major/long term damage that can affect computer performance such as corrupt windows files, hardware, (I've read some things about stack/heap damage)? If it's possible to do serious damage, what would cause it and how do I prevent it?
T. Loughlin
3 Solutions

Each program you make runs as a process.. And when a process is created a chunk of memory if allocated for that process... for its code... for its stack ...for its heap... etc. So the affect of memory leak remains as long as your program /process runs....

No memory leak won't do any hardware curroption or curropt your Operating system (Windows)... It only hinder the performance of your system.... So your system might ruin slow in case of memory leak..... But if the process is terminated, which is causing the memory leak, then the machine will come back to normal state....

paintlrdAuthor Commented:
Even if there is an access violation?
T Loughlin
Access violation will automatically stop your application. For the above mentioned memory leak issues, killing of the process will do & no need tyo restart the sytem for that
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

It all depends on how well the operating system was written.  if they overlooked some things, it's very possible to use up some system resource, such as a system file table, or to fil up the disk.    The better systems check every request you make and try to make sure you are not requesting too much of some resource.

Just going by anecdotes, it seems Kinux is very good at checking, as many Linux systems run for months and years without requiring a reboot.   On the other hand, Solaris and Windows NT have in the past had major memory leaks, requiring frequent reboots to reclaim lost memory.

Sorry, meant to type "Linux", not "Kinux".

Also the program's language doesnt have much to do with this question, you can request memory, files, and other resources from most any language.

paintlrdAuthor Commented:
Thanks guys. You all had a part in answering so I split it between all of you. I appreciate it.

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now