aboutsummaryrefslogtreecommitdiff
path: root/hw/avr/arduino.c
diff options
context:
space:
mode:
authorDaniel P. Berrangé <berrange@redhat.com>2025-06-10 13:37:01 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2025-06-12 13:40:16 -0400
commit7eeb1d3acc175813ad3d5e824f26123e0992093a (patch)
treebc6520979fcbd5902d2fa3a9a868ea8a2c78fd37 /hw/avr/arduino.c
parent8b723287b84a62bb5d1a7799ef0959ca8e6c293a (diff)
downloadqemu-7eeb1d3acc175813ad3d5e824f26123e0992093a.zip
qemu-7eeb1d3acc175813ad3d5e824f26123e0992093a.tar.gz
qemu-7eeb1d3acc175813ad3d5e824f26123e0992093a.tar.bz2
hw/nvme/ctrl: skip automatic zero-init of large arrays
The 'nvme_map_sgl' method has a 256 element array used for copying data from the device. Skip the automatic zero-init of this array to eliminate the performance overhead in the I/O hot path. The 'segment' array will be fully initialized when reading data from the device. The 'nme_changed_nslist' method has a 4k byte array that is manually initialized with memset(). The compiler ought to be intelligent enough to turn the memset() into a static initialization operation, and thus not duplicate the automatic zero-init. Replacing memset() with '{}' makes it unambiguous that the array is statically initialized. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Klaus Jensen <k.jensen@samsung.com> Message-id: 20250610123709.835102-24-berrange@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'hw/avr/arduino.c')
0 files changed, 0 insertions, 0 deletions