From owner-freebsd-hackers Wed Aug 12 14:23:22 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA14217 for freebsd-hackers-outgoing; Wed, 12 Aug 1998 14:23:22 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from chouette.inria.fr (chouette.inria.fr [138.96.24.103]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA14201 for ; Wed, 12 Aug 1998 14:23:20 -0700 (PDT) (envelope-from Emmanuel.Duros@sophia.inria.fr) Received: by chouette.inria.fr (8.8.8/8.8.5) id XAA03579; Wed, 12 Aug 1998 23:22:54 +0200 (MET DST) Date: Wed, 12 Aug 1998 23:22:54 +0200 (MET DST) Message-Id: <199808122122.XAA03579@chouette.inria.fr> From: Emmanuel Duros To: freebsd-hackers@FreeBSD.ORG Subject: Allocating memory in a network device driver Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I am currently writing a network device driver and I need clarification on how to allocate memory. I have seen in many device drivers allocating memory in the following way: u_char *buf; buf = malloc( BUFSIZ, M_DEVBUF, M_NOWAIT); Do we get the same result with : ? u_char buf[BUFSIZ]; In fact I have not found much documentation on the malloc function used in device driver. Can anyone point me to some ? I wonder what the M_DEVBUF, M_NOWAIT,... parameters are exactly for. Thanks a lot Emmanuel Duros To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message