<?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 test program in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-test-program/m-p/2590123#M857394</link>
    <description>&lt;BR /&gt;malloc only allocates the space in memory, it doesnt reserve it which means it doesnt actually use up that amount of memory, whereas datalock locks the memory - which means its marked as not useable to the system and thus causes the performance impact you are after. You can see the difference if you run the program and use top or vmstat to monitor memory usage.</description>
    <pubDate>Fri, 05 Oct 2001 07:09:30 GMT</pubDate>
    <dc:creator>Stefan Farrelly</dc:creator>
    <dc:date>2001-10-05T07:09:30Z</dc:date>
    <item>
      <title>memory test program</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-test-program/m-p/2590120#M857391</link>
      <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;I would like to create a C program to grab a huge chunk of memory to test out that out kernel parameters are right and force our system to swap a bit to check out performance. Does someone have a C program that can do this for me please ? I would be very grateful. Thanks!&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 05 Oct 2001 06:53:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-test-program/m-p/2590120#M857391</guid>
      <dc:creator>Carol Garrett</dc:creator>
      <dc:date>2001-10-05T06:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: memory test program</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-test-program/m-p/2590121#M857392</link>
      <description>&lt;BR /&gt;Heres a piece of code that will do it;&lt;BR /&gt;&lt;BR /&gt;#define NULL 0&lt;BR /&gt;main()&lt;BR /&gt;{&lt;BR /&gt;int ptr;&lt;BR /&gt;ptr = NULL; &lt;BR /&gt;ptr = datalock(2000000000,50000);&lt;BR /&gt;sleep(15);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Stick it in a file, eg. test.c, and compile with +DA2.0w (64bit);&lt;BR /&gt;cc +DA2.0w -o test test.c&lt;BR /&gt;Then run test, and from another window running top you will see a 2GB process start - and stop 15 secs later. If you dont have enough free ram or maxdsiz_64bit is too low you will get a not enough space error.&lt;BR /&gt;</description>
      <pubDate>Fri, 05 Oct 2001 06:56:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-test-program/m-p/2590121#M857392</guid>
      <dc:creator>Stefan Farrelly</dc:creator>
      <dc:date>2001-10-05T06:56:55Z</dc:date>
    </item>
    <item>
      <title>Re: memory test program</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-test-program/m-p/2590122#M857393</link>
      <description>&lt;BR /&gt;Thanks Stefan!&lt;BR /&gt;&lt;BR /&gt;But why use datalock, I thought you would use malloc ?&lt;BR /&gt;&lt;BR /&gt;Carol&lt;BR /&gt;</description>
      <pubDate>Fri, 05 Oct 2001 07:03:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-test-program/m-p/2590122#M857393</guid>
      <dc:creator>Carol Garrett</dc:creator>
      <dc:date>2001-10-05T07:03:47Z</dc:date>
    </item>
    <item>
      <title>Re: memory test program</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-test-program/m-p/2590123#M857394</link>
      <description>&lt;BR /&gt;malloc only allocates the space in memory, it doesnt reserve it which means it doesnt actually use up that amount of memory, whereas datalock locks the memory - which means its marked as not useable to the system and thus causes the performance impact you are after. You can see the difference if you run the program and use top or vmstat to monitor memory usage.</description>
      <pubDate>Fri, 05 Oct 2001 07:09:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-test-program/m-p/2590123#M857394</guid>
      <dc:creator>Stefan Farrelly</dc:creator>
      <dc:date>2001-10-05T07:09:30Z</dc:date>
    </item>
  </channel>
</rss>

