<?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: malloc() - Error No 12 in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/malloc-error-no-12/m-p/4222583#M92018</link>
    <description>Yeah, I got ya on the maxdsiz for 32 bit and maxdsiz_64bit for 64 bit apps...I just can't understand why this program at 32bit will only alloc about 889mb on this host and then when ran on the other host go up to just over 1GB? I can't see why it will do it there but not on this host as they are configured the same.&lt;BR /&gt;&lt;BR /&gt;Any ideas on why that might be?&lt;BR /&gt;&lt;BR /&gt;Thanks so much!</description>
    <pubDate>Wed, 25 Jun 2008 20:11:57 GMT</pubDate>
    <dc:creator>KennethMRay</dc:creator>
    <dc:date>2008-06-25T20:11:57Z</dc:date>
    <item>
      <title>malloc() - Error No 12</title>
      <link>https://community.hpe.com/t5/operating-system-linux/malloc-error-no-12/m-p/4222578#M92013</link>
      <description>Hi all, I am getting an errno 12...basically an error when we run a program and the dsiz hits around 900MB...but our maxdsiz and maxdsiz_64bit are larger and actually are set exactly the same as another box where the program runs fine. I've even bumped up maxdxiz &amp;amp;64bit and ran the program just to see if that was it, but it still dies at the same place.&lt;BR /&gt;&lt;BR /&gt;Any ideas?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;</description>
      <pubDate>Wed, 25 Jun 2008 19:19:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/malloc-error-no-12/m-p/4222578#M92013</guid>
      <dc:creator>KennethMRay</dc:creator>
      <dc:date>2008-06-25T19:19:55Z</dc:date>
    </item>
    <item>
      <title>Re: malloc() - Error No 12</title>
      <link>https://community.hpe.com/t5/operating-system-linux/malloc-error-no-12/m-p/4222579#M92014</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Well, errno = 12 = ENOMEM&lt;BR /&gt;&lt;BR /&gt;If this is a 32-bit process, then 'maxdsiz' sets the limit.  If this is a64-bit process, then 'maxdsiz_64bit'&lt;BR /&gt;&lt;BR /&gt;This can also be caused by a lack of swap space.  Verify with 'swapinfo -tam'.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
      <pubDate>Wed, 25 Jun 2008 19:37:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/malloc-error-no-12/m-p/4222579#M92014</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-06-25T19:37:41Z</dc:date>
    </item>
    <item>
      <title>Re: malloc() - Error No 12</title>
      <link>https://community.hpe.com/t5/operating-system-linux/malloc-error-no-12/m-p/4222580#M92015</link>
      <description>Yeah, we've got plenty of swap and maxdsiz is set the same as another box where it runs fine. Now I just wrote a small c program just to test how far it will go and it bombs at around 889MB but runs further on the other system setup the same. &lt;BR /&gt;&lt;BR /&gt;Now, I just recompiled this small program that I wrote with +dd64 and then when I run it it goes further...but before it dies earlier and the issue is why it only goes to 889MB on this box but much further on the other box that is darn near identical...kernel bits, maxdsiz, dsiz_64bit, tsiz, ssize, swap, etc...</description>
      <pubDate>Wed, 25 Jun 2008 19:48:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/malloc-error-no-12/m-p/4222580#M92015</guid>
      <dc:creator>KennethMRay</dc:creator>
      <dc:date>2008-06-25T19:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: malloc() - Error No 12</title>
      <link>https://community.hpe.com/t5/operating-system-linux/malloc-error-no-12/m-p/4222581#M92016</link>
      <description>Here are the differences in the kernels...nothing that should be causing this difference that I can see.&lt;BR /&gt;&lt;BR /&gt;&amp;lt; dbc_max_pct                       3  3                   Immed&lt;BR /&gt;&amp;lt; dbc_min_pct                       2  2                   Immed&lt;BR /&gt;---&lt;BR /&gt;&amp;gt; dbc_max_pct                      12  12                  Immed&lt;BR /&gt;&amp;gt; dbc_min_pct                       5  Default             Immed&lt;BR /&gt;53c53&lt;BR /&gt;&amp;lt; maxdsiz                  1073741824  1073741824          Immed&lt;BR /&gt;---&lt;BR /&gt;&amp;gt; maxdsiz                  1073741824  Default             Immed&lt;BR /&gt;59c59&lt;BR /&gt;&amp;lt; maxssiz                   134217728  134217728           Immed&lt;BR /&gt;---&lt;BR /&gt;&amp;gt; maxssiz                     8388608  Default             Immed&lt;BR /&gt;62c62&lt;BR /&gt;&amp;lt; maxtsiz_64bit            1073741824  1073741824          Immed&lt;BR /&gt;---&lt;BR /&gt;&amp;gt; maxtsiz_64bit            1073741824  Default             Immed&lt;BR /&gt;64c64&lt;BR /&gt;&amp;lt; maxvgs                          256  256&lt;BR /&gt;---&lt;BR /&gt;&amp;gt; maxvgs                          100  100&lt;BR /&gt;</description>
      <pubDate>Wed, 25 Jun 2008 19:54:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/malloc-error-no-12/m-p/4222581#M92016</guid>
      <dc:creator>KennethMRay</dc:creator>
      <dc:date>2008-06-25T19:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: malloc() - Error No 12</title>
      <link>https://community.hpe.com/t5/operating-system-linux/malloc-error-no-12/m-p/4222582#M92017</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;What I'm saying is that a 32-bit applications is goverened by 'maxdsiz' --- not 'maxdsiz_64-bit'.  Further, a 32-bit appplication has a data size limit of about 940MB unless it has been enabled with 'chatr' to be an 'EXEC_MAGIC' executable and then the limit is ~ 1.9 GB for the data space.&lt;BR /&gt;&lt;BR /&gt;Do a 'file' on your executable.  Unless is says "ELF-64" or "LP64" it's a 32-bit application.  COmpiling with "+DA2.0W" will generate a 64-bit application.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 25 Jun 2008 20:06:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/malloc-error-no-12/m-p/4222582#M92017</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-06-25T20:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: malloc() - Error No 12</title>
      <link>https://community.hpe.com/t5/operating-system-linux/malloc-error-no-12/m-p/4222583#M92018</link>
      <description>Yeah, I got ya on the maxdsiz for 32 bit and maxdsiz_64bit for 64 bit apps...I just can't understand why this program at 32bit will only alloc about 889mb on this host and then when ran on the other host go up to just over 1GB? I can't see why it will do it there but not on this host as they are configured the same.&lt;BR /&gt;&lt;BR /&gt;Any ideas on why that might be?&lt;BR /&gt;&lt;BR /&gt;Thanks so much!</description>
      <pubDate>Wed, 25 Jun 2008 20:11:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/malloc-error-no-12/m-p/4222583#M92018</guid>
      <dc:creator>KennethMRay</dc:creator>
      <dc:date>2008-06-25T20:11:57Z</dc:date>
    </item>
    <item>
      <title>Re: malloc() - Error No 12</title>
      <link>https://community.hpe.com/t5/operating-system-linux/malloc-error-no-12/m-p/4222584#M92019</link>
      <description>It's right there in your output (and if this is a default executable [no use of chatr to go EXEC_MAGIC]), I'm sorry -- but I don't believe you when you claim it goes above 1Gb for a 32-bit app. It may go over 1 billion bytes, but that's not the same thing.&lt;BR /&gt;&lt;BR /&gt;Anyway -- the difference in the machines in the difference in maxssiz:&lt;BR /&gt;&lt;BR /&gt;&amp;lt; maxssiz 134217728 134217728 Immed&lt;BR /&gt;---&lt;BR /&gt;&amp;gt; maxssiz 8388608 Default Immed&lt;BR /&gt;&lt;BR /&gt;The default layout for 32-bit applications is 2 private quadrants and 2 shared quadrants. One private quadrant is used for the Text (yes, there's a lot of virtual address space that's unused for small programs... but there's optimizations when you have the same binary run in many places and only Read+Executable. Performance is a good thing... and that's why EXEC_MAGIC isn't the default).&lt;BR /&gt;&lt;BR /&gt;The other private quadrant holds all other private objects -- that's your heap [where the malloc is going] _and_ MAP_PRIVATE mmap objects _and_ most importantly, your stack. The stack grows from low addresses to high -- so in order for maxssiz to work, the stack *must* start maxssiz (rounded down to a page) before the end of the private quadrant. You can't span the quadrant.&lt;BR /&gt;&lt;BR /&gt;So a higher maxssiz means you have less space for other private data... such as your malloc() space. On one system, you have 128Mb of virtual address space reserved for stack consumption. No malloc() over 896Mb [minus 4096 bytes, but close enough] will be possible... because you hit the stack.&lt;BR /&gt;&lt;BR /&gt;On the other, the stack is only 8Mb, hence you have around 1016Mb available for other private objects.&lt;BR /&gt;&lt;BR /&gt;Or in short, if you want more data -- lower maxssiz.</description>
      <pubDate>Wed, 25 Jun 2008 22:56:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/malloc-error-no-12/m-p/4222584#M92019</guid>
      <dc:creator>Don Morris_1</dc:creator>
      <dc:date>2008-06-25T22:56:24Z</dc:date>
    </item>
    <item>
      <title>Re: malloc() - Error No 12</title>
      <link>https://community.hpe.com/t5/operating-system-linux/malloc-error-no-12/m-p/4222585#M92020</link>
      <description>&amp;gt;JRF: Further, a 32-bit application has a data size limit of about 940MB unless it has been enabled with 'chatr' to be an EXEC_MAGIC executable&lt;BR /&gt;&lt;BR /&gt;For PA you can get 3 Gb without -N by using chatr +q3p enable +q4p enable&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Compiling with "+DA2.0W" will generate a 64-bit application.&lt;BR /&gt;&lt;BR /&gt;+DD64 should be used instead of the obsolete +DA2.0W form.</description>
      <pubDate>Thu, 26 Jun 2008 07:26:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/malloc-error-no-12/m-p/4222585#M92020</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-06-26T07:26:19Z</dc:date>
    </item>
    <item>
      <title>Re: malloc() - Error No 12</title>
      <link>https://community.hpe.com/t5/operating-system-linux/malloc-error-no-12/m-p/4222586#M92021</link>
      <description>Regarding the over 1gb...i simply used that to...never mind.&lt;BR /&gt;&lt;BR /&gt;I appreciate all of the education that I am getting here. My question is simply why would it be able to allocate more memory on one system than the other.&lt;BR /&gt;&lt;BR /&gt;The smaller maxssiz is set on the system that is able to allocate more memory...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;</description>
      <pubDate>Thu, 26 Jun 2008 14:05:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/malloc-error-no-12/m-p/4222586#M92021</guid>
      <dc:creator>KennethMRay</dc:creator>
      <dc:date>2008-06-26T14:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: malloc() - Error No 12</title>
      <link>https://community.hpe.com/t5/operating-system-linux/malloc-error-no-12/m-p/4222587#M92022</link>
      <description>Exactly. maxssiz is the default size of the stack. The stack reserves virtual address space from the Private virtual address space available to the process, in the amount of the stack size (and hence maxssiz).&lt;BR /&gt;&lt;BR /&gt;If you have X Gb [in this case 1] available as potential malloc space, and you always take away maxssiz -- the bigger maxssiz is, the less you have left. Hence the machine that can malloc more, does so because maxssiz is smaller (and the stack reserves less virtual address space).</description>
      <pubDate>Thu, 26 Jun 2008 15:00:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/malloc-error-no-12/m-p/4222587#M92022</guid>
      <dc:creator>Don Morris_1</dc:creator>
      <dc:date>2008-06-26T15:00:20Z</dc:date>
    </item>
    <item>
      <title>Re: malloc() - Error No 12</title>
      <link>https://community.hpe.com/t5/operating-system-linux/malloc-error-no-12/m-p/4222588#M92023</link>
      <description>Excellent...thanks you very mcuh for spelling it out for me..I appreciate it.</description>
      <pubDate>Thu, 26 Jun 2008 15:16:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/malloc-error-no-12/m-p/4222588#M92023</guid>
      <dc:creator>KennethMRay</dc:creator>
      <dc:date>2008-06-26T15:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: malloc() - Error No 12</title>
      <link>https://community.hpe.com/t5/operating-system-linux/malloc-error-no-12/m-p/4222589#M92024</link>
      <description>And if you link with -N, EXEC_MAGIC, if you use a large maxssiz, it will limit your heap to 2 Gb - maxssiz.</description>
      <pubDate>Fri, 27 Jun 2008 05:46:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/malloc-error-no-12/m-p/4222589#M92024</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-06-27T05:46:41Z</dc:date>
    </item>
    <item>
      <title>Re: malloc() - Error No 12</title>
      <link>https://community.hpe.com/t5/operating-system-linux/malloc-error-no-12/m-p/4222590#M92025</link>
      <description>I forgot to mention that if you have some applications (Fortran) that need the larger maxssiz but your application needs the larger heap, you can use "ulimit -s 8192" to limit the stack for child processes.</description>
      <pubDate>Fri, 27 Jun 2008 17:29:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/malloc-error-no-12/m-p/4222590#M92025</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-06-27T17:29:12Z</dc:date>
    </item>
  </channel>
</rss>

