<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Memory Exhausted in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-exhausted/m-p/2850610#M721389</link>
    <description>I am going to take a wild guess but the default stack size is 8MB and that could be your problem. You don;t mention what language that this program was written in but if you are using a lot of local variables (especially with recusrion), you could very easily exhaust stack space. You could increase maxssiz but the better answer is to look at your code and see if you can't dynamically allocate memory (and free it when finished).&lt;BR /&gt;</description>
    <pubDate>Sun, 24 Nov 2002 22:07:27 GMT</pubDate>
    <dc:creator>A. Clay Stephenson</dc:creator>
    <dc:date>2002-11-24T22:07:27Z</dc:date>
    <item>
      <title>Memory Exhausted</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-exhausted/m-p/2850608#M721387</link>
      <description>Hello folks,&lt;BR /&gt;There is this recurring problem with a small utility that i have written. Its basically a conversion utility that parses information from a propriety binary format to XML. The problem is that with small files the utlity works fine. But with a binary file of around 7 Megs, the utility does a core dump with an error:&lt;BR /&gt;Memory exhausted.&lt;BR /&gt;What could be the problem and posibble cure? I have &lt;BR /&gt;RAM=512 Megs &lt;BR /&gt;swap=1024 &lt;BR /&gt;OS=HP-UX 11.00</description>
      <pubDate>Sat, 23 Nov 2002 07:00:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-exhausted/m-p/2850608#M721387</guid>
      <dc:creator>Mustafa Motiwala</dc:creator>
      <dc:date>2002-11-23T07:00:55Z</dc:date>
    </item>
    <item>
      <title>Re: Memory Exhausted</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-exhausted/m-p/2850609#M721388</link>
      <description>&lt;BR /&gt;You need to look at your kernel parameters, and of course your program to make sure you aren't consuming all of the available memory.&lt;BR /&gt;&lt;BR /&gt;Post the kernel parameters here and we will take a look at them.&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Sun, 24 Nov 2002 21:42:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-exhausted/m-p/2850609#M721388</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2002-11-24T21:42:44Z</dc:date>
    </item>
    <item>
      <title>Re: Memory Exhausted</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-exhausted/m-p/2850610#M721389</link>
      <description>I am going to take a wild guess but the default stack size is 8MB and that could be your problem. You don;t mention what language that this program was written in but if you are using a lot of local variables (especially with recusrion), you could very easily exhaust stack space. You could increase maxssiz but the better answer is to look at your code and see if you can't dynamically allocate memory (and free it when finished).&lt;BR /&gt;</description>
      <pubDate>Sun, 24 Nov 2002 22:07:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-exhausted/m-p/2850610#M721389</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-11-24T22:07:27Z</dc:date>
    </item>
    <item>
      <title>Re: Memory Exhausted</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-exhausted/m-p/2850611#M721390</link>
      <description>Hi,&lt;BR /&gt;Thanx for the tips, the code is in C. I am looking into mending the code, but its a bit difficult, coz to allocate dynamic memory i dont know before hand exactly how much i will need.any suggestions?&lt;BR /&gt;Thanx.&lt;BR /&gt;P.S. Sorry for the late feedback, was out of reach due to weekend.</description>
      <pubDate>Mon, 25 Nov 2002 04:39:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-exhausted/m-p/2850611#M721390</guid>
      <dc:creator>Mustafa Motiwala</dc:creator>
      <dc:date>2002-11-25T04:39:28Z</dc:date>
    </item>
    <item>
      <title>Re: Memory Exhausted</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-exhausted/m-p/2850612#M721391</link>
      <description>I wouldn't dare to argue with olympian, but I think that stack problems would have more stack-related error.&lt;BR /&gt;&lt;BR /&gt;Check this:&lt;BR /&gt;&lt;BR /&gt;int fun( void )&lt;BR /&gt;{&lt;BR /&gt; char arr[ 1 &amp;lt;&amp;lt; 24 ]; // eat stack&lt;BR /&gt; return fun();&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;int main( void )&lt;BR /&gt;{&lt;BR /&gt; return fun();&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;aCC, run:&lt;BR /&gt;&lt;BR /&gt;Pid 23574 received a SIGSEGV for stack growth failure.&lt;BR /&gt;Possible causes: insufficient memory or swap space,&lt;BR /&gt;or stack size exceeded maxssiz.&lt;BR /&gt;Segmentation fault (core dumped)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I think that exhausting heap is the problem here. Check maxdsiz, and the most important: Check very carefully if you're freeing absolutelly everything allocated by you earlier.&lt;BR /&gt;&lt;BR /&gt;Good luck&lt;BR /&gt;&lt;BR /&gt;Adam&lt;BR /&gt;</description>
      <pubDate>Mon, 25 Nov 2002 11:01:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-exhausted/m-p/2850612#M721391</guid>
      <dc:creator>Adam J Markiewicz</dc:creator>
      <dc:date>2002-11-25T11:01:35Z</dc:date>
    </item>
    <item>
      <title>Re: Memory Exhausted</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-exhausted/m-p/2850613#M721392</link>
      <description>'Memory exhausted' is not an OS defined error message but is almost certainly an application defined error message. You really need to know the value of errno when you crash or better yet compile with -g and no optimization and then let your program die. You then use a debugger to do a stack trace to zero in on the line of code that is causing your program to crash.&lt;BR /&gt;&lt;BR /&gt;Dynamic memory does not require that you know exactly how much memory you need but only how much ADDITIONAL memory you need at this moment. For example, using the sizeof() pseudofunction, you might find that you need 80 bytes for a struct, you then call malloc(), calloc(), or realloc() with the value you obtained from sizeof().&lt;BR /&gt;</description>
      <pubDate>Mon, 25 Nov 2002 15:25:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-exhausted/m-p/2850613#M721392</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-11-25T15:25:57Z</dc:date>
    </item>
  </channel>
</rss>

