PERFORCE change 35567 for review

Sam Leffler sam at FreeBSD.org
Tue Aug 5 16:12:18 PDT 2003


http://perforce.freebsd.org/chv.cgi?CH=35567

Change 35567 by sam at sam_ebb on 2003/08/05 16:11:26

	add R_Zalloc definition that returns a zero'd area; this is to
	take advantage of pre-zeroing support in the kernel

Affected files ...

.. //depot/projects/netperf/sys/net/radix.h#2 edit

Differences ...

==== //depot/projects/netperf/sys/net/radix.h#2 (text+ko) ====

@@ -153,12 +153,14 @@
 #define Bcopy(a, b, n) bcopy(((char *)(a)), ((char *)(b)), (unsigned)(n))
 #define Bzero(p, n) bzero((char *)(p), (int)(n));
 #define R_Malloc(p, t, n) (p = (t) malloc((unsigned int)(n)))
+#define R_Zalloc(p, t, n) (p = (t) calloc(1,(unsigned int)(n)))
 #define Free(p) free((char *)p);
 #else
 #define Bcmp(a, b, n) bcmp(((caddr_t)(a)), ((caddr_t)(b)), (unsigned)(n))
 #define Bcopy(a, b, n) bcopy(((caddr_t)(a)), ((caddr_t)(b)), (unsigned)(n))
 #define Bzero(p, n) bzero((caddr_t)(p), (unsigned)(n));
 #define R_Malloc(p, t, n) (p = (t) malloc((unsigned long)(n), M_RTABLE, M_NOWAIT))
+#define R_Zalloc(p, t, n) (p = (t) malloc((unsigned long)(n), M_RTABLE, M_NOWAIT | M_ZERO))
 #define Free(p) free((caddr_t)p, M_RTABLE);
 
 #define	RADIX_NODE_HEAD_LOCK_INIT(rnh)	\


More information about the p4-projects mailing list