mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
virtio-devices: Use SmallVec for descriptor chains
Rather than instantiating a vector for parsing the descriptor chain in advance instead use a SmallVec bounded by the expected length of the descriptor chain. This removes vector allocations from those paths. As smallvec was already a block dependency move it to a workspace dependency and use it from there. Fixes: #5079 Signed-off-by: Rob Bradford <rbradford@meta.com>
This commit is contained in:
@@ -30,6 +30,7 @@ serde_with = { workspace = true, default-features = false, features = [
|
||||
"macros",
|
||||
] }
|
||||
serial_buffer = { path = "../serial_buffer" }
|
||||
smallvec = { workspace = true }
|
||||
thiserror = { workspace = true }
|
||||
vhost = { workspace = true, features = [
|
||||
"vhost-kern",
|
||||
|
||||
Reference in New Issue
Block a user