/* only shift, to make sure things (TM) keep aligned */
alloc_sz = req_sz;
- mem = kmalloc(alloc_sz << 2, M_SAFEMEM, M_WAITOK);
-
- bzero(mem, alloc_sz << 2);
-
+ mem = kmalloc(alloc_sz << 2, M_SAFEMEM, M_WAITOK | M_ZERO);
user_mem = mem + alloc_sz;
hdr = (struct safe_mem_hdr *)(user_mem - sizeof(*hdr));
tail = (struct safe_mem_tail *)(user_mem + alloc_sz);
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/kern/kern_linker.c,v 1.41.2.3 2001/11/21 17:50:35 luigi Exp $
- * $DragonFly: src/sys/kern/kern_linker.c,v 1.44 2008/09/01 19:39:44 dillon Exp $
*/
#include "opt_ddb.h"
KLD_DPF(FILE, ("linker_make_file: new file, filename=%s\n", filename));
lockmgr(&lock, LK_EXCLUSIVE);
- lf = kmalloc(sizeof(struct linker_file), M_LINKER, M_WAITOK);
- bzero(lf, sizeof(*lf));
-
+ lf = kmalloc(sizeof(struct linker_file), M_LINKER, M_WAITOK | M_ZERO);
lf->refs = 1;
lf->userrefs = 0;
lf->flags = 0;