On Thu, Jun 12, 2008 at 3:47 PM, Toni Mueller <[EMAIL PROTECTED]> wrote: > as of today (I didn't notice it earlier), I see this problem on one of > my machines: > > # netstat -rnf inet > netstat: sysctl of routing table: Cannot allocate memory
"netstat -r" dumps the routing table by calling sysctl() twice, once to get the size of the table so that it can allocate enough memory to hold it, and then a second call to actually fill it in. That error means the routing table grew between the two calls, so the second call could return the entire table. > Any idea about how to combat this, please? The code will need to be changed to a) add a fudge factor to the size that was returned, and b) retry the pair of calls if the second returns ENOMEM I'll try to send you a patch this weekend. Philip Guenther