From owner-freebsd-net@FreeBSD.ORG Mon Oct 17 12:27:02 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CA11116A41F for ; Mon, 17 Oct 2005 12:27:02 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: from web35703.mail.mud.yahoo.com (web35703.mail.mud.yahoo.com [66.163.179.157]) by mx1.FreeBSD.org (Postfix) with SMTP id CCA1543D60 for ; Mon, 17 Oct 2005 12:26:57 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: (qmail 58725 invoked by uid 60001); 17 Oct 2005 12:26:57 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=BjOJIls2l9EhbgySTLwhXYpnjkj0cLSzH/+SuQIy038KvHz9j0dwz9w15wf4KlitU78oBXQ9e2ySiDtsqmUqCrop2gZ3HEzNec9dpzaVL7Ma0fqAF4E4L9ZRZjxwWt6ysCLEBPcclS+uIc9sTb34G1NwTIFYbsTPN0FpovgH4dQ= ; Message-ID: <20051017122657.58723.qmail@web35703.mail.mud.yahoo.com> Received: from [202.79.62.15] by web35703.mail.mud.yahoo.com via HTTP; Mon, 17 Oct 2005 05:26:57 PDT Date: Mon, 17 Oct 2005 05:26:57 -0700 (PDT) From: kamal kc To: freebsd-net@freebsd.org In-Reply-To: <20051017120734.GA820@taran.infoua.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: freebsd-hackers@freebsd.org Subject: Re: malloc() in kernel and increasing mbuf and cluster size X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2005 12:27:02 -0000 > > sys/malloc.h has function prototypes for malloc() > > kern/kern_malloc.c defines the malloc() > > > > the malloc() definition is > > > > void * > > malloc(size, type, flags) > > unsigned long size; > > struct malloc_type *type; > > int flags; > > > > i understand the size and flags but what shall i > > do with the malloc_type. > > man 9 malloc :-) > i saw the man pages. it says to use malloc_type via MALLOC_DEFINE(type,shortdesc,longdesc) MALLOC_DECLARE(type) the man pages use M_FOOBUF(where did it come from ??) in the field type. Now how should i code it. struct malloc_type mytype; mytype=MALLOC_DEFINE(.....,"mybuffers","mybuffers"); what should i put in the type field ?? thanks in advance, kamal __________________________________ Yahoo! Music Unlimited Access over 1 million songs. Try it free. http://music.yahoo.com/unlimited/