Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Aug 1998 23:22:54 +0200 (MET DST)
From:      Emmanuel Duros <Emmanuel.Duros@sophia.inria.fr>
To:        freebsd-hackers@FreeBSD.ORG
Subject:   Allocating memory in a network device driver
Message-ID:  <199808122122.XAA03579@chouette.inria.fr>

next in thread | raw e-mail | index | archive | help

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199808122122.XAA03579>