Merge branch 'perf/p2-contiguous-reads' into feat/p2-perf-coverage
# Conflicts: # CHANGELOG.md # docs/known-issues.md
This commit is contained in:
@@ -278,6 +278,8 @@ pub(crate) fn alloc_output(len: usize) -> Result<Vec<u8>, FormatError> {
|
||||
if ptr.is_null() {
|
||||
return Err(failed());
|
||||
}
|
||||
// Before anything writes to it, so a large buffer faults in huge pages.
|
||||
crate::bulk_alloc::advise_huge_pages(ptr, len);
|
||||
// SAFETY: `ptr` came from the global allocator with the layout of
|
||||
// `[u8; len]`, which is exactly what `Vec<u8>` with capacity `len` frees;
|
||||
// all `len` bytes are initialised (zero).
|
||||
|
||||
Reference in New Issue
Block a user