Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Tracking memory leaks tips - Solaris

  • 10-02-2009 10:53am
    #1
    Registered Users, Registered Users 2 Posts: 5,659 ✭✭✭


    Hi all (experienced testers especially :pac:),

    Any tips for this - trying to troubleshoot what may cause memory leaks. I know of top and prstat - am running them in crontab every 10 mins to get snapshots, as well as RSS memory stats from prstat -p

    Is there any other tips you can offer


Comments

  • Registered Users, Registered Users 2 Posts: 2,082 ✭✭✭Tobias Greeshman


    Do you have access to Purify? If so that would be very beneficial for tracing down the leak.


  • Registered Users, Registered Users 2 Posts: 39 Talon.ie


    Hi,
    There's a couple of options available to you. Purify is a good one, but I hear it's pricey.

    You can use libumem as well. It ships with Solaris 9. It's an alternative memory allocator that can replace the standard malloc. You don't need to re-compile, just LD_PRELOAD it. Basically it'll spot a memory leak, write out a description/error report and then abort. Read this for more info http://developers.sun.com/solaris/articles/libumem_library.html. One added benefit of libumem is that it can seriously outperform the standard malloc in a multithreaded app. (though it can be slower in a single threaded app). The usual performance related rules apply (measure, measure, measure)

    You can also use DTrace if you've got it. You'll find an article about it here. http://developers.sun.com/solaris/articles/dtrace_cc.html


  • Registered Users, Registered Users 2 Posts: 6,570 ✭✭✭daymobrew


    Talon.ie wrote: »
    You can also use DTrace if you've got it. You'll find an article about it here. http://developers.sun.com/solaris/articles/dtrace_cc.html
    DTrace is the business! It gives you amazing access to system info - for example, you could have it record all calls to malloc and free which might give you info about a mismatch of those calls.

    I never had a need but colleagues use it all the time.
    You could look at the DTrace Community and its forum on opensolaris.org.


Advertisement