Date: Thu, 13 Dec 2012 16:39:09 GMT From: Brooks Davis <brooks@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 219901 for review Message-ID: <201212131639.qBDGd9oZ052422@skunkworks.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@219901?ac=10 Change 219901 by brooks@brooks_zenith on 2012/12/13 16:38:36 Prefault the stack and heap by zeroing them. This signficantly reduces the runtime of the first invocation of libmagic sandboxes. Affected files ... .. //depot/projects/ctsrd/cheribsd/src/lib/libcheri/sandbox.c#3 edit Differences ... ==== //depot/projects/ctsrd/cheribsd/src/lib/libcheri/sandbox.c#3 (text+ko) ==== @@ -174,6 +174,7 @@ warn("%s: mmap heap", __func__); goto error; } + memset(base, 0, sb->sb_heaplen); base += sb->sb_heaplen; length -= sb->sb_heaplen; @@ -192,6 +193,7 @@ warn("%s: mmap stack", __func__); goto error; } + memset(base, 0, length); base += STACK_SIZE; length -= STACK_SIZE;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201212131639.qBDGd9oZ052422>