mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-28 01:16:50 +00:00
00571bf162
Many of the Aml implementations wrote temporary results into a Vec<u8>, then appended that Vec to the aml bytestream. Instead, append or insert directly into the aml vector to avoid the extra allocations and copies. This also eliminates the confusing reverse() calls when inserting the PkgLength, which were needed due to inserting the encoded length one byte at a time at the beginning of the bytestream; instead, use the splice() function to insert all of the bytes in order at once. BUG=None TEST=cargo test -p acpi_tables Change-Id: If97d9f0dec9e2654716761c0827d9f2cbaa4f54a Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5660936 Commit-Queue: Daniel Verkamp <dverkamp@chromium.org> Reviewed-by: Frederick Mayle <fmayle@google.com> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |