<?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: Allocation Memory Problem in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/allocation-memory-problem/m-p/3742613#M256403</link>
    <description>The attached file displays fine. Rather than selecting download, just open it with Notepad and either copy the text or save the text as a local file on your PC. The warning message is normal. It means that the executable won't run on a very old HP box (ie, PA 1.1). Did the compilation produce as executable file (ie, "program")?&lt;BR /&gt;</description>
    <pubDate>Thu, 02 Mar 2006 10:05:55 GMT</pubDate>
    <dc:creator>Bill Hassell</dc:creator>
    <dc:date>2006-03-02T10:05:55Z</dc:date>
    <item>
      <title>Allocation Memory Problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/allocation-memory-problem/m-p/3742610#M256400</link>
      <description>Hi, &lt;BR /&gt;I have a problem with application memory allocation.&lt;BR /&gt;I try to create a simple C program to verify memory allocation trough malloc system calls.&lt;BR /&gt;I verify with glance and see that the max allocate memory is 944MB VSS and 15MB RSS for my C process&lt;BR /&gt;I execute a tusc command to see the status of C program, and it return the following error:&lt;BR /&gt;&lt;BR /&gt;brk(0x7b106000)....ERR#12 ENOMEM&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I verify the values of kernel parametrs :&lt;BR /&gt;&lt;BR /&gt;shmem  1                          &lt;BR /&gt;shmmax 0X200000000                &lt;BR /&gt;shmmni 512                        &lt;BR /&gt;shmseg 512&lt;BR /&gt;maxdsiz 4294963200                 &lt;BR /&gt;maxdsiz_64bit 6442450944               &lt;BR /&gt;maxfiles  300                        &lt;BR /&gt;maxfiles_lim 4224                       &lt;BR /&gt;maxqueuetime 0&lt;BR /&gt;maxssiz 0X800000                   &lt;BR /&gt;maxssiz_64bit 0X800000                   &lt;BR /&gt;maxswapchunks 2048                       &lt;BR /&gt;maxtsiz  0x4000000                  &lt;BR /&gt;maxtsiz_64bit 0X40000000 &lt;BR /&gt;&lt;BR /&gt;In attach the textof C programm.&lt;BR /&gt;Are there memory limitation that causes my error ?&lt;BR /&gt;Thanks for helps&lt;BR /&gt;&lt;BR /&gt;Bye Filo</description>
      <pubDate>Thu, 02 Mar 2006 08:24:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/allocation-memory-problem/m-p/3742610#M256400</guid>
      <dc:creator>Filosofo</dc:creator>
      <dc:date>2006-03-02T08:24:59Z</dc:date>
    </item>
    <item>
      <title>Re: Allocation Memory Problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/allocation-memory-problem/m-p/3742611#M256401</link>
      <description>944 megs is the maximum amount of RAM your 32bit program can allocate unless you adjust the compile and executable options. 32bit programs have 4 separate quadrants, each 1Gb in size. So the data area (where malloc starts allocation RAM) is 1Gb and with some overhead items, the limit is about 940megs. Note also that the kernel parameter maxdsiz (which is for 32bit programs) will further limit the maximum size.&lt;BR /&gt; &lt;BR /&gt;Now, by recompiling your program with EXEC_MAGIC options, you can get both quadrant 1 (called 'text area' or the executable instructions) and quadrant 2 (local data area) to be treated as a single local data area, allowing your program to allocate up to about 1750megs. Try recompiling with:&lt;BR /&gt; &lt;BR /&gt;cc -Ae -Wl -N -o myprog myprog.c&lt;BR /&gt; &lt;BR /&gt;You can also modify the EXEC_MAGIC executable with the chatr program to map quadrant 3 and 4 (but VERY dependent on HP-UX version and patches). Or recompile your program as a 64bit program and all RAM limitations disappear (be sure to change maxdsiz_64 to a larger value, perhaps 20-50 Gb. Note that you  do not need 30Gb of RAM to run a program that allocates 30Gb of memory -- just make sure you have plenty of swap, such as 40Gb of swap on a system with 4Gb of RAM. Yes, it will run and allocate the memory just fine although a lot of swap reservation will take place.&lt;BR /&gt; &lt;BR /&gt;The attached program will demonstrate the following maximum malloc limits:&lt;BR /&gt; &lt;BR /&gt;940megs&lt;BR /&gt;1750megs&lt;BR /&gt;2700megs&lt;BR /&gt;3700megs&lt;BR /&gt;and unlimited with 64bit compile.</description>
      <pubDate>Thu, 02 Mar 2006 08:46:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/allocation-memory-problem/m-p/3742611#M256401</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2006-03-02T08:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: Allocation Memory Problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/allocation-memory-problem/m-p/3742612#M256402</link>
      <description>Hi Bill,&lt;BR /&gt;thanks for Help.&lt;BR /&gt;I try to compile my C programm with your optinos:&lt;BR /&gt;&lt;BR /&gt;usr/bin/cc -Ae -Wl -N -o  program prova.c&lt;BR /&gt;&lt;BR /&gt;I recived this output:&lt;BR /&gt;&lt;BR /&gt;/usr/ccs/bin/ld: (Warning) At least one PA 2.0 object file (prova.o) was detected. The linked output may not run on a PA 1.x system&lt;BR /&gt;&lt;BR /&gt;Can you re-send the attachment...I can't download it.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;Bye Filo&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Mar 2006 09:05:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/allocation-memory-problem/m-p/3742612#M256402</guid>
      <dc:creator>Filosofo</dc:creator>
      <dc:date>2006-03-02T09:05:53Z</dc:date>
    </item>
    <item>
      <title>Re: Allocation Memory Problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/allocation-memory-problem/m-p/3742613#M256403</link>
      <description>The attached file displays fine. Rather than selecting download, just open it with Notepad and either copy the text or save the text as a local file on your PC. The warning message is normal. It means that the executable won't run on a very old HP box (ie, PA 1.1). Did the compilation produce as executable file (ie, "program")?&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Mar 2006 10:05:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/allocation-memory-problem/m-p/3742613#M256403</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2006-03-02T10:05:55Z</dc:date>
    </item>
  </channel>
</rss>

