Professional Web Applications Themes

libgc.so - UNIX Programming

Memory leaks are found often in our C++ application which is running on Solaris machine. So, it was decided to link with libgc.so which comes with Solaris. Before start doing that, I would want to know your experiences/thoughts/suggestions on using this library. - Will this really fix all memory leaks in a C/C++ application? What are the leaks that can still escape from this? - Will it cause any performance impacts ie. reducing the existing performance in a time critical application? - Any other things that we have to take care? Kindly pour in your suggestions....

  1. #1

    Default libgc.so

    Memory leaks are found often in our C++ application which is running
    on Solaris machine. So, it was decided to link with libgc.so which
    comes with Solaris.

    Before start doing that, I would want to know your
    experiences/thoughts/suggestions on using this library.
    - Will this really fix all memory leaks in a C/C++ application?
    What are the leaks that can still escape from this?
    - Will it cause any performance impacts ie. reducing the existing
    performance
    in a time critical application?
    - Any other things that we have to take care?

    Kindly pour in your suggestions.
    qazmlp Guest

  2. #2

    Default Re: libgc.so

    In article <google.com>, qazmlp wrote: 
    I'd say you should try rather hard with some memory leak finding
    tool, and plug those rather. 
    Often. Not guaranteed though. 
    Leaks that arn't true leaks. e.g. still keeping a pointer
    to something you really should have disposed long ago.
     
    malloc and especially free can take substancial longer time now. 


    --
    Vennlig hilsen/Best Regards
    Nils Olav Selåsdal
    System Engineer
    w w w . u t e l s y s t e m s . c o m
    Nils Guest

  3. #3

    Default Re: libgc.so

    There is another good tool purify that comes with solaris box.
    This finds memory leaks - memory that has been allocated but can no
    longer be acessed
    because there are no pointers to it.
    This also detects
    reading / writing beyond array limit
    reading / writing freed memory

    Refer man purify

    Rgds,
    --Chandrakant



    "qazmlp" <com> wrote in message
    news:google.com... 


    Chandrakant Guest

  4. #4

    Default Re: libgc.so

    "Chandrakant Mohire" <bosch.com> writes in comp.unix.solaris:
    |There is another good tool purify that comes with solaris box.

    Purify is good, but isn't included with Solaris. You have to buy it
    from IBM (formerly Rational, before that PureAtria, and long ago, Pure
    Software). http://www-306.ibm.com/software/awdtools/purifyplus/

    Sun does have very similar functionality in the dbx debugger included
    with the Sun Studio compiler products.

    --
    __________________________________________________ ______________________
    Alan Coopersmith calberkeley.org
    http://www.CSUA.Berkeley.EDU/~alanc/ aka: COM
    Working for, but definitely not speaking for, Sun Microsystems, Inc.
    Alan Guest

Similar Threads

  1. statically linking to libgc.so
    By qazmlp in forum UNIX Programming
    Replies: 15
    Last Post: January 20th, 11:13 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139