So, the problem isn't that I've forgotten to release memory in my code, it's a register leak in the PCAP code? That I can work around, so that's good news for me. I just wanted to make sure I wasn't doing something wrong.
<br><br>Thanks,<br>Paul<br><br><div><span class="gmail_quote">On 9/25/07, <b class="gmail_sendername">Guy Harris</b> <<a href="mailto:guy@alum.mit.edu">guy@alum.mit.edu</a>> wrote:</span><blockquote class="gmail_quote" style="margin-top: 0; margin-right: 0; margin-bottom: 0; margin-left: 0; margin-left: 0.80ex; border-left-color: #cccccc; border-left-width: 1px; border-left-style: solid; padding-left: 1ex">
<br>On Sep 25, 2007, at 3:52 PM, Paul Heil wrote:<br><br>> I have a pcap application that uses a filter (as below). The 15th<br>> time I call pcap_compile(), it fails with the error "too many<br>> registers needed to evaluate expression".
<br><br>Wow. I thought I fixed that one in *2001*:<br><br> revision 1.161<br> date: 2001-12-18 01:10:49 -0800; author: guy; state: Exp; lines:<br>+2 -1<br> Free up both "registers" (scratch memory locations, really) used by an
<br> arithmetic expression in a filter; otherwise, we leak registers when<br> compiling arithmetic expressions.<br><br>> I'm using PCAP v4.0.1 and developer pack 4.0.1.<br><br>WinPcap 4.0.1 should be based on a version of libpcap with that fix
<br>(which first showed up in libpcap 0.8); perhaps there's another place<br>where the code generator leaks registers.<br><br>> Is there a call other than pcap_freecode() I should be using to free<br>> the memory allocated in the pcap_compile() command?
<br><br>No. This leak isn't a memory leak, so pcap_freecode() won't help.<br>_______________________________________________<br>Winpcap-users mailing list<br><a href="mailto:Winpcap-users@winpcap.org">Winpcap-users@winpcap.org
</a><br><a href="https://www.winpcap.org/mailman/listinfo/winpcap-users">https://www.winpcap.org/mailman/listinfo/winpcap-users</a><br></blockquote></div><br>