Date: Sun, 8 Oct 2006 15:45:41 GMT From: Howard Su <howardsu@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 107503 for review Message-ID: <200610081545.k98Fjf5b084459@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=107503 Change 107503 by howardsu@su_laptop on 2006/10/08 15:45:40 Init list header correctly. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/kern/vmem.c#5 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/kern/vmem.c#5 (text+ko) ==== @@ -48,8 +48,9 @@ { vmem_t *idpool; struct entry *e; - e = malloc(sizeof(struct entry), M_VMEM, M_WAITOK); - idpool = malloc(sizeof(vmem_t), M_VMEM, M_WAITOK); + e = malloc(sizeof(struct entry), M_VMEM, M_WAITOK | M_ZERO); + idpool = malloc(sizeof(vmem_t), M_VMEM, M_WAITOK | M_ZERO); + LIST_INIT(idpool); e->start = base; e->end = (char*)~0; @@ -87,7 +88,7 @@ return; } else { - newnp = malloc(sizeof(vmem_t), M_VMEM, M_WAITOK); + newnp = malloc(sizeof(vmem_t), M_VMEM, M_WAITOK | M_ZERO); newnp->start = newnp->end = vaddr; LIST_INSERT_BEFORE(np, newnp, entries); return;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200610081545.k98Fjf5b084459>