From owner-freebsd-hackers Sat Sep 22 0:40:36 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from reservoir.absolight.com (reservoir.absolight.com [212.43.217.72]) by hub.freebsd.org (Postfix) with ESMTP id 3D25137B422 for ; Sat, 22 Sep 2001 00:40:33 -0700 (PDT) Received: from bilbo.in.mat.cc (bilbo.in.mat.cc [212.43.217.121]) by reservoir.absolight.com (Postfix) with ESMTP id 78EA0D3AE6 for ; Sat, 22 Sep 2001 09:40:25 +0200 (CEST) Received: from bilbo.org (localhost [127.0.0.1]) by bilbo.in.mat.cc (Postfix) with ESMTP id 66F7F65554 for ; Sat, 22 Sep 2001 09:40:23 +0200 (CEST) Received: from club-internet.fr (sauron.in.mat.cc [212.43.217.122]) by bilbo.in.mat.cc (Postfix) with ESMTP id BA32065554 for ; Sat, 22 Sep 2001 09:39:41 +0200 (CEST) Message-ID: <3BAC403D.A89893D3@club-internet.fr> Date: Sat, 22 Sep 2001 09:39:41 +0200 From: Mathieu Arnold Organization: http://www.absolight.com/ X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: freebsd hackers Subject: MALLOC_DEFINE Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi I'm having memory problems using ipfilter. I have a lot of rules, and a lot of traffic, here is what i have from time to time : IP states added: 9469918 TCP 1654588 UDP 1451233 ICMP 2869559782 hits 100258517 misses 0 maximum 72605 no memory 2915 bkts in use 9766 active 3099381 expired 9393987 closed and that, because ipfilter uses the temp memory zone, which is used by many other kernel stuff, and sometime gets full. in ip_state.h, I found : # ifdef M_PFIL # define KMALLOC(a, b) MALLOC((a), b, sizeof(*(a)), M_PFIL, M_NOWAIT) # define KMALLOCS(a, b, c) MALLOC((a), b, (c), M_PFIL, M_NOWAIT) # define KFREE(x) FREE((x), M_PFIL) # define KFREES(x,s) FREE((x), M_PFIL) # else # define KMALLOC(a, b) MALLOC((a), b, sizeof(*(a)), M_TEMP, M_NOWAIT) # define KMALLOCS(a, b, c) MALLOC((a), b, (c), M_TEMP, M_NOWAIT) # define KFREE(x) FREE((x), M_TEMP) # define KFREES(x,s) FREE((x), M_TEMP) # endif /* M_PFIL */ I was wondering if it was possible to add some MALLOC_DEFINE(M_PFIL, "ipfilter", "some bigger description"); or static MALLOC_DEFINE(M_PFIL, "ipfilter", "some bigger description"); but I do not know where to put it, neither which one to use, as both are used in the kernel source tree. Some help would really be appreciated. ps: FreeBSD mano.absolight.com 4.3-RELEASE-p19 FreeBSD 4.3-RELEASE-p19 #2: Fri Sep 14 20:09:37 CEST 2001 -- Mathieu Arnold To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message