Date: Sun, 29 Jun 2003 20:30:17 -0700 (PDT) From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 33871 for review Message-ID: <200306300330.h5U3UHbe097540@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=33871 Change 33871 by rwatson@rwatson_powerbook on 2003/06/29 20:29:18 Implement M_ZERO for Darwin. Makes for much smaller diffs against the FreeBSD version of kern_mac.c. Affected files ... .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/bsd/kern/kern_malloc.c#2 edit .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/bsd/sys/malloc.h#2 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin/apsl/xnu/bsd/kern/kern_malloc.c#2 (text+ko) ==== @@ -304,6 +304,13 @@ mem->hdr.mlen = memsize; + /* + * XXX: If Mach supported background page zeroing, we'd want to be + * using that here somehow. + */ + if (flags & M_ZERO) + bzero(mem->hdr.dat, mem->hdr.mlen); + return (mem->hdr.dat); } ==== //depot/projects/trustedbsd/sedarwin/apsl/xnu/bsd/sys/malloc.h#2 (text+ko) ==== @@ -68,6 +68,7 @@ */ #define M_WAITOK 0x0000 #define M_NOWAIT 0x0001 +#define M_ZERO 0x0100 /* bzero the allocation */ /* * Types of memory to be allocated (not all are used by us)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200306300330.h5U3UHbe097540>