Print this page
6141 use kmem_zalloc instead of kmem_alloc + bzero/memset
*** 26,37 ****
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
- #pragma ident "%Z%%M% %I% %E% SMI" /* from S5R4 1.10 */
-
/*
* Description: The pckt module packetizes messages on
* its read queue by pre-fixing an M_PROTO
* message type to certain incoming messages.
*/
--- 26,35 ----
*** 222,233 ****
}
/*
* Allocate state structure.
*/
! pip = kmem_alloc(sizeof (*pip), KM_SLEEP);
! bzero(pip, sizeof (*pip));
#ifdef _MULTI_DATAMODEL
pip->model = ddi_model_convert_from(get_udatamodel());
#endif /* _MULTI_DATAMODEL */
--- 220,230 ----
}
/*
* Allocate state structure.
*/
! pip = kmem_zalloc(sizeof (*pip), KM_SLEEP);
#ifdef _MULTI_DATAMODEL
pip->model = ddi_model_convert_from(get_udatamodel());
#endif /* _MULTI_DATAMODEL */