Debugging Memory on Linux

Petr explains how programmers can prevent nasty program memory bugs.


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


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


Thanks in advance and best regards,


White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState