diff options
author | sam <sam@FreeBSD.org> | 2003-08-19 17:23:07 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2003-08-19 17:23:07 +0000 |
commit | c42975683b87a593cd277f57df30d6e69e03047a (patch) | |
tree | e973588a5f36d0acea09e3193d86f3fbbf394080 /sys/net | |
parent | 54fc4fe4303630d4130d47ce6a29c9978797adf4 (diff) | |
download | FreeBSD-src-c42975683b87a593cd277f57df30d6e69e03047a.zip FreeBSD-src-c42975683b87a593cd277f57df30d6e69e03047a.tar.gz |
add R_Zalloc definition that returns pre-zero'd memory
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/radix.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/net/radix.h b/sys/net/radix.h index 81a3766..7975434 100644 --- a/sys/net/radix.h +++ b/sys/net/radix.h @@ -153,12 +153,14 @@ struct radix_node_head { #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) \ |