PERFORCE change 219901 for review
Brooks Davis
brooks at FreeBSD.org
Thu Dec 13 16:39:10 UTC 2012
http://p4web.freebsd.org/@@219901?ac=10
Change 219901 by brooks at 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;
More information about the p4-projects
mailing list