<?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 (HP's memory handling) in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/malloc-hp-s-memory-handling/m-p/5128519#M674971</link>
    <description>&amp;gt;I don't know how to chase a memory leak&lt;BR /&gt;&lt;BR /&gt;Look at SEP's link for the simple/big picture.&lt;BR /&gt;For WDB:&lt;BR /&gt;&lt;A href="http://www.hp.com/go/wdb" target="_blank"&gt;http://www.hp.com/go/wdb&lt;/A&gt;&lt;BR /&gt;Go to the documentation link and then download:&lt;BR /&gt;Â» Debugging dynamic memory usage errors using HP WDB&lt;BR /&gt;&lt;BR /&gt;&amp;gt;even ordinary memory fragmentation&lt;BR /&gt;&lt;BR /&gt;You probably can't.  :-(&lt;BR /&gt;Looks like a leak except libc/wdb/purify claims that there is no growth in allocations, just in free blocks.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;in someone else's APP.&lt;BR /&gt;&lt;BR /&gt;You just need to know how to run wdb/gdb.</description>
    <pubDate>Wed, 10 Sep 2008 07:02:25 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2008-09-10T07:02:25Z</dc:date>
    <item>
      <title>Malloc (HP's memory handling)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/malloc-hp-s-memory-handling/m-p/5128511#M674963</link>
      <description>Hi everyone,&lt;BR /&gt;&lt;BR /&gt;I hope someone can help. Currently we have a Unibase application running out of memory every so often. When it is initially started, the memory usage is fine, but this builds up gradually over time until eventually the machine is out of memory. The APP is then stopped and restarted, memory grows etc..&lt;BR /&gt;&lt;BR /&gt;Now, to me, this looks like a memory leak somewhere. The Unibase developers are adamant that this is an HPUX issue (see their comments attached). &lt;BR /&gt;&lt;BR /&gt;Can anyone shed some more light before they convince us to buy more memory, which may ultimately be a waste?&lt;BR /&gt;&lt;BR /&gt;Thanks!</description>
      <pubDate>Mon, 08 Sep 2008 10:27:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/malloc-hp-s-memory-handling/m-p/5128511#M674963</guid>
      <dc:creator>marius etsebeth_1</dc:creator>
      <dc:date>2008-09-08T10:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: Malloc (HP's memory handling)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/malloc-hp-s-memory-handling/m-p/5128512#M674964</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;A 'malloc()' allocates memory in the heap.  A subsequent 'free()' returns that memory for reuse to the heap, but not to the system at-large.  Upon termination of a process, the entire heap is returned to the system.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 08 Sep 2008 10:55:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/malloc-hp-s-memory-handling/m-p/5128512#M674964</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-09-08T10:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: Malloc (HP's memory handling)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/malloc-hp-s-memory-handling/m-p/5128513#M674965</link>
      <description>Shalom&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.hpux.ws/?p=8" target="_blank"&gt;http://www.hpux.ws/?p=8&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Memory leak detector.&lt;BR /&gt;&lt;BR /&gt;The response to a memory leak is to FIX it, not buy memory.&lt;BR /&gt;&lt;BR /&gt;Once you show unibase evidence of a memory leak associated with one of their processes they'll have to fix it.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Mon, 08 Sep 2008 10:55:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/malloc-hp-s-memory-handling/m-p/5128513#M674965</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2008-09-08T10:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: Malloc (HP's memory handling)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/malloc-hp-s-memory-handling/m-p/5128514#M674966</link>
      <description>As JRF and Unibase says, the heap will grow and never return memory to the system.&lt;BR /&gt;So if your application uses lots of memory in the middle and frees most of it near the end, that application will need to exit.&lt;BR /&gt;Or be reprogrammed to use shared memory or mapped files.&lt;BR /&gt;&lt;BR /&gt;Or you deal with this by adding lots of swap.&lt;BR /&gt;Do "swapinfo -tam" when you said "the machine is out of memory".&lt;BR /&gt;&lt;BR /&gt;&amp;gt;The OS-process resources will not release (or decrease in size) after the processing completes&lt;BR /&gt;&lt;BR /&gt;This isn't quite true.  The VM use won't decrease but the memory should/could just be paged out.&lt;BR /&gt;&lt;BR /&gt;Of course there still could be a leak in the application, check with wdb.</description>
      <pubDate>Mon, 08 Sep 2008 11:03:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/malloc-hp-s-memory-handling/m-p/5128514#M674966</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-09-08T11:03:54Z</dc:date>
    </item>
    <item>
      <title>Re: Malloc (HP's memory handling)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/malloc-hp-s-memory-handling/m-p/5128515#M674967</link>
      <description>The statement from Unibase is broadly correct although it doesn't give much context.&lt;BR /&gt;&lt;BR /&gt;Allocating memory is very expensive in CPU-time (as your UNIBASE person found when he tried using the other malloc library), so its generally preferable to leave the free'd memory in the processes data segment.&lt;BR /&gt;&lt;BR /&gt;There are some fairly esoteric ways of tuning the behaviour of malloc if you're interested (look at the man page for malloc(3c) in the "EXTERNAL INFLUENCES" section), but I would be wary of using these without knowing exactly what you're doing. Better to request some assitance via the response centre for this (although it might be considered "consulting" and mean a cost!)&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Duncan</description>
      <pubDate>Mon, 08 Sep 2008 12:05:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/malloc-hp-s-memory-handling/m-p/5128515#M674967</guid>
      <dc:creator>Duncan Edmonstone</dc:creator>
      <dc:date>2008-09-08T12:05:35Z</dc:date>
    </item>
    <item>
      <title>Re: Malloc (HP's memory handling)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/malloc-hp-s-memory-handling/m-p/5128516#M674968</link>
      <description>There could be N problems here:&lt;BR /&gt;1) An ordinary memory leak in the application.&lt;BR /&gt;2) Heap fragmentation, looks like a leak.&lt;BR /&gt;3) Swap space exhaustion because space is kept until program exit.&lt;BR /&gt;&lt;BR /&gt;Since you said "memory grows", it probably isn't 3) like I first mentioned??</description>
      <pubDate>Mon, 08 Sep 2008 19:57:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/malloc-hp-s-memory-handling/m-p/5128516#M674968</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-09-08T19:57:08Z</dc:date>
    </item>
    <item>
      <title>Re: Malloc (HP's memory handling)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/malloc-hp-s-memory-handling/m-p/5128517#M674969</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;It occurs to me to also ask, do you ever issue 'kill -9' ?  The point of the question is that your memory exhaustion could be at least partially a result of leaving shared memory segments lying around.  &lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 08 Sep 2008 21:42:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/malloc-hp-s-memory-handling/m-p/5128517#M674969</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-09-08T21:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: Malloc (HP's memory handling)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/malloc-hp-s-memory-handling/m-p/5128518#M674970</link>
      <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;Thanks for the replies so far. Allow me to answer a few of your questions:&lt;BR /&gt;&lt;BR /&gt;1.) Personally, I haven't used kill -9 on these machines, but it may be that someone else with the necessary access has...&lt;BR /&gt;&lt;BR /&gt;2.) Swap space utilization was yesterday at 31%; today it's 43%. Still nowhere near fully utilized.&lt;BR /&gt;&lt;BR /&gt;Quite frankly, I don't know how to chase a memory leak or even ordinary memory fragmentation in someone else's APP. And unfortunately, the APPS owners aren't too keen on assisting either as they want us to put in more memory.&lt;BR /&gt;&lt;BR /&gt;I'll see what I can come up with in the next day or so and will then allocate points to all accordingly.&lt;BR /&gt;&lt;BR /&gt;Marius&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 10 Sep 2008 06:54:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/malloc-hp-s-memory-handling/m-p/5128518#M674970</guid>
      <dc:creator>marius etsebeth_1</dc:creator>
      <dc:date>2008-09-10T06:54:45Z</dc:date>
    </item>
    <item>
      <title>Re: Malloc (HP's memory handling)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/malloc-hp-s-memory-handling/m-p/5128519#M674971</link>
      <description>&amp;gt;I don't know how to chase a memory leak&lt;BR /&gt;&lt;BR /&gt;Look at SEP's link for the simple/big picture.&lt;BR /&gt;For WDB:&lt;BR /&gt;&lt;A href="http://www.hp.com/go/wdb" target="_blank"&gt;http://www.hp.com/go/wdb&lt;/A&gt;&lt;BR /&gt;Go to the documentation link and then download:&lt;BR /&gt;Â» Debugging dynamic memory usage errors using HP WDB&lt;BR /&gt;&lt;BR /&gt;&amp;gt;even ordinary memory fragmentation&lt;BR /&gt;&lt;BR /&gt;You probably can't.  :-(&lt;BR /&gt;Looks like a leak except libc/wdb/purify claims that there is no growth in allocations, just in free blocks.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;in someone else's APP.&lt;BR /&gt;&lt;BR /&gt;You just need to know how to run wdb/gdb.</description>
      <pubDate>Wed, 10 Sep 2008 07:02:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/malloc-hp-s-memory-handling/m-p/5128519#M674971</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-09-10T07:02:25Z</dc:date>
    </item>
    <item>
      <title>Re: Malloc (HP's memory handling)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/malloc-hp-s-memory-handling/m-p/5128520#M674972</link>
      <description>Thanks to all who replied. &lt;BR /&gt;&lt;BR /&gt;I have learned one or two things that I may use, but ultimately, it would depend on the co-operation of the Unibase people, especially if I want to go down the debugger -route.&lt;BR /&gt;&lt;BR /&gt;Marius</description>
      <pubDate>Tue, 16 Sep 2008 09:48:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/malloc-hp-s-memory-handling/m-p/5128520#M674972</guid>
      <dc:creator>marius etsebeth_1</dc:creator>
      <dc:date>2008-09-16T09:48:19Z</dc:date>
    </item>
    <item>
      <title>Re: Malloc (HP's memory handling)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/malloc-hp-s-memory-handling/m-p/5128521#M674973</link>
      <description>marius,&lt;BR /&gt;&lt;BR /&gt;you might also want to point the unibase folks at this new next gen malloc routine in the latest release of 11iv3 (11.31) - might be worth them looking at as well:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://docs.hp.com/en/5992-4174/ch10s09.html" target="_blank"&gt;http://docs.hp.com/en/5992-4174/ch10s09.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Duncan</description>
      <pubDate>Thu, 18 Sep 2008 08:05:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/malloc-hp-s-memory-handling/m-p/5128521#M674973</guid>
      <dc:creator>Duncan Edmonstone</dc:creator>
      <dc:date>2008-09-18T08:05:05Z</dc:date>
    </item>
    <item>
      <title>Re: Malloc (HP's memory handling)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/malloc-hp-s-memory-handling/m-p/5128522#M674974</link>
      <description>&amp;gt;especially if I want to go down the debugger route.&lt;BR /&gt;&lt;BR /&gt;Actually if you know what you are doing, you don't need their help (unless stripped), unless you want them to change things, as Duncan suggests.  :-)&lt;BR /&gt;</description>
      <pubDate>Thu, 18 Sep 2008 19:25:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/malloc-hp-s-memory-handling/m-p/5128522#M674974</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-09-18T19:25:18Z</dc:date>
    </item>
  </channel>
</rss>

