Quote:
Originally Posted by Rajini Hi Tom,
Thanks for the information ,it was useful in understanding few internal concepts on how memory is handled.
Based on your reply ,I have few clarifications....
Two kinds of memory leaks can occur - at the system level - and the more common memory leaks where program allocated memory is not returned to the memory pool including (leaked threads and open files)
<Rajini> Is there a in-built command\process available in "SUN Solaris" which does Garbage collection and takes care of Memory leaks.
The reason I am curious is ,if there is no in-built option available then the only option which I guess for the Server to reclaim the memory would be after a server re-boot.(Correct me I am wrong....)
Regards,
Rajini |
Hi Rajini,
Usually, servers are not general purpose, e.g. a dedicated data base server host, or an Apache web server running on a web host (other servers may also be running).
Some hosts (nodes on networks), have more than one special purpose server running.
It all depends on whether the memory leak was caused by poor programming at the user level - in which case, when the command is exited, the system will clean up its use of local memory allocated to it. While the program (command) is running, then if it was compiled with a garbage collecting library - the GC will take care of memory cleanup dynamically while the program (server) is still running.
Then there is the OS which takes care of process level cleanup after command (programs or servers) are exited.
A server reboot does not have to mean a total system OS reboot, just an exit for the server, and then re-launch it.
No one system level garbage collector is needed. Each command or server probably manages its own allocated memory - unless it has an unknown bug that occurs, and the server needs to be rebooted (not the entire system).
-- Tom