From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 3 14:57:46 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 626AF16A41F; Thu, 3 Nov 2005 14:57:46 +0000 (GMT) (envelope-from keramida@linux.gr) Received: from kane.otenet.gr (kane.otenet.gr [195.170.0.95]) by mx1.FreeBSD.org (Postfix) with ESMTP id BC4CD43D62; Thu, 3 Nov 2005 14:57:39 +0000 (GMT) (envelope-from keramida@linux.gr) Received: from flame.pc (aris.bedc.ondsl.gr [62.103.39.226]) by kane.otenet.gr (8.13.4/8.13.4/Debian-1) with SMTP id jA3EvbCi002251; Thu, 3 Nov 2005 16:57:38 +0200 Received: from flame.pc (flame [127.0.0.1]) by flame.pc (8.13.4/8.13.4) with ESMTP id jA3EvTF4002154; Thu, 3 Nov 2005 16:57:29 +0200 (EET) (envelope-from keramida@linux.gr) Received: (from keramida@localhost) by flame.pc (8.13.4/8.13.4/Submit) id jA3EvTIC002153; Thu, 3 Nov 2005 16:57:29 +0200 (EET) (envelope-from keramida@linux.gr) Date: Thu, 3 Nov 2005 16:57:29 +0200 From: Giorgos Keramidas To: kamal kc Message-ID: <20051103145729.GA2088@flame.pc> References: <20051103023936.63209.qmail@web35704.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051103023936.63209.qmail@web35704.mail.mud.yahoo.com> Cc: freebsd , freebsd Subject: Re: allocating 14KB memory per packet compression/decompression results in vm_fault X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Nov 2005 14:57:46 -0000 On 2005-11-02 18:39, kamal kc wrote: > dear everybody, > > i am trying to compress/decompress ip packets. > for this i have implemented the adaptive lzw compression. > i put the code in the ip_output.c and do my compression/decompression > just before the if_output() function call so that i won't interfere with > the ip processing of the kernel. > > for my compression/decompression i use string tables and temporary > buffers which take about 14KB of memory per packet. If you're allocating 14 KB of data just to send (approximately) 1.4 KB and then you throw away the 14 KB immediately, it sounds terrible.