Re: mbuf leaks

Larry Wall (jpl-devvax!
18 Aug 88 22:57:57 GMT

In article <2881@ttidca.TTI.COM> (Michael Bloom) writes:
: Can anyone suggest good techniques for tracking down mbuf leaks?

I don't know if this is still valid, but in 4.2 I split up the DATA mbuf
type into twenty-some-odd different types of mbufs, depending on where they
were allocated. After tweaking netstat to show which DATA type, it was easy
to see which allocator didn't have a matching deallocator. Generally
that was sufficient to deduce the location of the leak. Sometimes a
judicious printf or two helps as well, just so you don't go overboard.
Generally you want to hide a printf behind a debugging variable you can
turn on and off with adb.

There may be better tools to diagnose this by now...

Larry Wall

This archive was generated by hypermail 2.0b3 on Thu Mar 09 2000 - 14:43:13 GMT