Date: Thu, 28 Jan 1999 14:49:03 +0100 (MET) From: Emmanuel Duros <Emmanuel.Duros@sophia.inria.fr> To: freebsd-hackers@FreeBSD.ORG Subject: rules to allocate buffers in device drivers Message-ID: <199901281349.OAA24119@chouette.inria.fr>
next in thread | raw e-mail | index | archive | help
Hi, I am currently writing a network device driver for FreeBSD and it is still unclear to me how to allocate memory. It seems that a common way of doing it is something like: u_char *buffer; buffer = malloc( SIZE, M_DEVBUF, M_NOWAIT); However I have not seen something like this in a device driver: u_char buffer[SIZE]; Is there a particular reason for not allocating buffers statically ? I have not found anything related to how to allocate memory in kernel code (definitions of malloc parameters, etc.). Do you have any pointer on that ? Thanks Emmanuel Duros To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901281349.OAA24119>