Debugging Memory on Linux

Petr explains how programmers can prevent nasty program memory bugs.
______________________

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

missing "static data"?

Anonymous's picture

should you have on the picture also "static data" ?

Re: Debugging Memory on Linux

Anonymous's picture

Dear Mr Petr,

I was reading your article on 'Debugging Memory on Linux' on Linux

Journal.

Recently we have a problem with memory on our Linux machine with 'out

of memory' crashes on one of our application software. I noticed that

the system admin has changed our stacksize limit to unlimited from

8192k. And ever since, all of us had 'out of memory' errors whenever

we at at about 950+M memory usage. We have a 3G memory for our Linux

machines. The system admin stand was that changing the stacksize to

unlimited should not cause this error. My guess is that setting the

stacksize to unlimited reserved 32bit or 2G of memory, leaving 1G

memory for user. That is why it crashes out of memory. On the other

hand, the system admin also claims that it works fine for Solaris when

the stacksize is set to unlimited. My guess is again on the larger

memory available for Solaris, so reserving 32bit or 2G for stack does

not take away so much resources from the available user memory.

I would appreciate your advice on that. I do not see out of memory

problem due to unlimited stacksize being addressed and would like to

know more about it. I hope you can enlighten me on that.

In addition, will most application software uses more user memory than

kernel memory? Can I say that compilers will need more of kernel

memory?

Thanks in advance and best regards,

SS

Webcast
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers

Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.

Learn More

Sponsored by AMD

White Paper
Red Hat White Paper: Using an Open Source Framework to Catch the Bad Guy

Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6

Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.

Learn more about catching the bad guy in this free white paper.

Learn More

Sponsored by DLT Solutions