Date: Mon, 17 Oct 2005 05:26:57 -0700 (PDT) From: kamal kc <kamal_ckk@yahoo.com> To: freebsd-net@freebsd.org Cc: freebsd-hackers@freebsd.org Subject: Re: malloc() in kernel and increasing mbuf and cluster size Message-ID: <20051017122657.58723.qmail@web35703.mail.mud.yahoo.com> In-Reply-To: <20051017120734.GA820@taran.infoua.com.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
> > 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/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051017122657.58723.qmail>