Re: Memory Leak

From: Brian Feldman (green_at_FreeBSD.org)
Date: 05/23/04

  • Next message: Craig Boston: "Re: USB ethernet CDC driver"
    Date: Sun, 23 May 2004 15:50:00 -0400
    To: "M. Warner Losh" <imp@bsdimp.com>
    
    

    On Sat, May 22, 2004 at 10:30:42PM -0600, M. Warner Losh wrote:
    > Any suggestions for leak detectors that work in real-time or in
    > response to some external signal? In a threaded application would be
    > ideal.
    >
    > I've hacked malloc to add the stack traceback to the utrace info
    > that's output by malloc. However, for applications that run for days,
    > and tend to allocate and free a lot of memory, you gotta have lots of
    > local storage. The restrictions in the kernel that requires this to
    > be a real file makes it harder.
    >
    > Also, there's a difference between what's in use and what is leaking..

    Try boehm-gc; I run the following local patch to the ports to fix
    a few things and let me enable compile options from the ports
    infrastructure. You can call the detector at any time to see if any
    leaks have occurred made.

    <URL:http://green.homeunix.org/~green/boehm-gc.diffs>

    -- 
    Brian Fundakowski Feldman                           \'[ FreeBSD ]''''''''''\
      <> green@FreeBSD.org                               \  The Power to Serve! \
     Opinions expressed are my own.                       \,,,,,,,,,,,,,,,,,,,,,,\
    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
    

  • Next message: Craig Boston: "Re: USB ethernet CDC driver"