search for: g_malloc0

Displaying 20 results from an estimated 55 matches for "g_malloc0".

Did you mean: t_malloc0
2012 Aug 13
27
[RFC-v2 0/6] vhost-scsi: Add support for host virtualized target
From: Nicholas Bellinger <nab at linux-iscsi.org> Hi Paolo, Stefan, & QEMU folks, The following is the second RFC series for vhost-scsi patches against mainline QEMU v1.1.0. The series is available from the following working branch: git://git.kernel.org/pub/scm/virt/kvm/nab/qemu-kvm.git vhost-scsi-merge Apologies for the delayed follow-up on this series. The changes detailed
2012 Aug 13
27
[RFC-v2 0/6] vhost-scsi: Add support for host virtualized target
From: Nicholas Bellinger <nab at linux-iscsi.org> Hi Paolo, Stefan, & QEMU folks, The following is the second RFC series for vhost-scsi patches against mainline QEMU v1.1.0. The series is available from the following working branch: git://git.kernel.org/pub/scm/virt/kvm/nab/qemu-kvm.git vhost-scsi-merge Apologies for the delayed follow-up on this series. The changes detailed
2015 Apr 15
0
[PATCH] vhost: fix log base address
...t.c +++ b/hw/virtio/vhost.c @@ -1016,10 +1016,13 @@ int vhost_dev_start(struct vhost_dev *hdev, VirtIODevice *vdev) } if (hdev->log_enabled) { + uint64_t log_base; + hdev->log_size = vhost_get_log_size(hdev); hdev->log = hdev->log_size ? g_malloc0(hdev->log_size * sizeof *hdev->log) : NULL; - r = hdev->vhost_ops->vhost_call(hdev, VHOST_SET_LOG_BASE, hdev->log); + log_base = (uint64_t)(unsigned long)log_base; + r = hdev->vhost_ops->vhost_call(hdev, VHOST_SET_LOG_BASE, &log_base); if (r &l...
2015 Apr 15
0
[PATCH] vhost: fix log base address
...t.c +++ b/hw/virtio/vhost.c @@ -1016,10 +1016,13 @@ int vhost_dev_start(struct vhost_dev *hdev, VirtIODevice *vdev) } if (hdev->log_enabled) { + uint64_t log_base; + hdev->log_size = vhost_get_log_size(hdev); hdev->log = hdev->log_size ? g_malloc0(hdev->log_size * sizeof *hdev->log) : NULL; - r = hdev->vhost_ops->vhost_call(hdev, VHOST_SET_LOG_BASE, hdev->log); + log_base = (uint64_t)(unsigned long)log_base; + r = hdev->vhost_ops->vhost_call(hdev, VHOST_SET_LOG_BASE, &log_base); if (r &l...
2014 Dec 11
0
[PATCH RFC v6 16/20] virtio-net: support longer header
...virtio_net_device_realize(DeviceState *dev, Error **errp) n->vqs[0].tx_waiting = 0; n->tx_burst = n->net_conf.txburst; - virtio_net_set_mrg_rx_bufs(n, 0); + virtio_net_set_mrg_rx_bufs(n, 0, 0); n->promisc = 1; /* for compatibility */ n->mac_table.macs = g_malloc0(MAC_TABLE_ENTRIES * ETH_ALEN); -- 1.7.9.5
2014 Dec 11
0
[PATCH RFC v6 16/20] virtio-net: support longer header
...virtio_net_device_realize(DeviceState *dev, Error **errp) n->vqs[0].tx_waiting = 0; n->tx_burst = n->net_conf.txburst; - virtio_net_set_mrg_rx_bufs(n, 0); + virtio_net_set_mrg_rx_bufs(n, 0, 0); n->promisc = 1; /* for compatibility */ n->mac_table.macs = g_malloc0(MAC_TABLE_ENTRIES * ETH_ALEN); -- 1.7.9.5
2007 Nov 10
1
3 commits - libswfdec/swfdec_image.c libswfdec/swfdec_image.h
...ge) SwfdecBuffer *buffer; int i, j; buffer = swfdec_bits_decompress (&bits, -1, 4 * image->width * image->height); - image->rowstride = 4 * image->width; if (buffer == NULL) { SWFDEC_ERROR ("failed to decompress data"); - image->data = g_malloc0 (4 * image->width * image->height); - return; + data = g_malloc0 (4 * image->width * image->height); + goto out; } - ptr = image->data = buffer->data; + ptr = data = buffer->data; /* image is stored in 0RGB format. We use ARGB/BGRA. */ for (...
2013 Dec 16
8
XEN/arm XENFB support
Goodmorning, I''m currently playing with XEN/arm on my Allwinner A20 (cubieboard2) I would like to get the XENFB driver working on domU. But currently in xen/arm there''s no support for VFB, atleast qemu is not supported. But this video http://www.youtube.com/watch?v=po1IeElg8tg and this one http://www.youtube.com/watch?v=Km6gBnIqaWo is showing a working framebuffer. So there are
2019 Apr 11
1
[RFC 2/3] hw/virtio-rdma: VirtIO rdma device
..._OK : + VIRTIO_RDMA_CTRL_ERR; +} + +static void virtio_rdma_init_dev_caps(VirtIORdma *rdev) +{ + rdev->dev_attr.max_qp_wr = 1024; +} + +int virtio_rdma_init_ib(VirtIORdma *rdev) +{ + int rc; + + virtio_rdma_init_dev_caps(rdev); + + rdev->rdma_dev_res = g_malloc0(sizeof(RdmaDeviceResources)); + rdev->backend_dev = g_malloc0(sizeof(RdmaBackendDev)); + + rc = rdma_backend_init(rdev->backend_dev, NULL, rdev->rdma_dev_res, + rdev->backend_device_name, + rdev->backend_port_num, &rdev-&g...
2023 Mar 06
0
[PATCH v4 01/15] vdpa net: move iova tree creation from init to start
...host_iova_tree_new(iova_range.first, iova_range.last); > > >>> + if (opts->x_svq && !vhost_vdpa_net_valid_svq_features(features, errp)) { > > >>> + goto err; > > >>> } > > >>> > > >>> ncs = g_malloc0(sizeof(*ncs) * queue_pairs); > > >>> @@ -825,7 +881,7 @@ int net_init_vhost_vdpa(const Netdev *netdev, const char *name, > > >>> for (i = 0; i < queue_pairs; i++) { > > >>> ncs[i] = net_vhost_vdpa_init(peer, TYPE_VHOST_VDPA, name, &g...
2020 May 11
0
[PATCH for QEMU v2] hw/vfio: Add VMD Passthrough Quirk
...70 > +#define VMD_SHADOW 0x2000 > +#define VMD_MEMBAR2 4 > + > +static int vfio_vmd_emulate_shadow_registers(VFIOPCIDevice *vdev) > +{ > + VFIOQuirk *quirk; > + VFIOVMDQuirk *data; > + PCIDevice *pdev = &vdev->pdev; > + int ret; > + > + data = g_malloc0(sizeof(*data)); > + ret = pread(vdev->vbasedev.fd, data->membar_phys, 16, > + vdev->config_offset + PCI_BASE_ADDRESS_2); > + if (ret != 16) { > + error_report("VMD %s cannot read MEMBARs (%d)", > + vdev->vbasedev.n...
2007 Oct 26
0
3 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_interpret.c
...C_AS_VALUE_SET_UNDEFINED (&cx->throw_value); } + + swfdec_action_try_data_unref (try_data); } static void @@ -2691,7 +2726,7 @@ swfdec_action_try (SwfdecAsContext *cx, guint action, const guint8 *data, guint return; } - try_data = g_malloc (sizeof (TryData)); + try_data = g_malloc0 (sizeof (TryData)); swfdec_bits_init_data (&bits, data, len); @@ -2716,8 +2751,9 @@ swfdec_action_try (SwfdecAsContext *cx, guint action, const guint8 *data, guint SWFDEC_WARNING ("leftover bytes in Try action"); } + swfdec_action_try_data_ref (try_data); swfdec_a...
2020 May 13
0
[PATCH for QEMU v2] hw/vfio: Add VMD Passthrough Quirk
...> +static int vfio_vmd_emulate_shadow_registers(VFIOPCIDevice *vdev) > > > +{ > > > + VFIOQuirk *quirk; > > > + VFIOVMDQuirk *data; > > > + PCIDevice *pdev = &vdev->pdev; > > > + int ret; > > > + > > > + data = g_malloc0(sizeof(*data)); > > > + ret = pread(vdev->vbasedev.fd, data->membar_phys, 16, > > > + vdev->config_offset + PCI_BASE_ADDRESS_2); > > > + if (ret != 16) { > > > + error_report("VMD %s cannot read MEMBARs (%d)", > &...
2012 Jun 25
4
[RFC V2 PATCH 0/4] Multiqueue support for tap and virtio-net/vhost
Hello all: This seires is an update of last version of multiqueue support to add multiqueue capability to both tap and virtio-net. Some kinds of tap backends has (macvatp in linux) or would (tap) support multiqueue. In such kind of tap backend, each file descriptor of a tap is a qeueu and ioctls were prodived to attach an exist tap file descriptor to the tun/tap device. So the patch let qemu to
2012 Jun 25
4
[RFC V2 PATCH 0/4] Multiqueue support for tap and virtio-net/vhost
Hello all: This seires is an update of last version of multiqueue support to add multiqueue capability to both tap and virtio-net. Some kinds of tap backends has (macvatp in linux) or would (tap) support multiqueue. In such kind of tap backend, each file descriptor of a tap is a qeueu and ioctls were prodived to attach an exist tap file descriptor to the tun/tap device. So the patch let qemu to
2007 Oct 28
0
4 commits - libswfdec-gtk/swfdec_gtk_loader.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_loader.c libswfdec/swfdec_loader.h libswfdec/swfdec_load_object.c
...+ swfdec_action_try_end_catch, try_data); + } + else + { + swfdec_action_try_data_free (try_data); } - - swfdec_action_try_data_unref (try_data); } static void @@ -2720,7 +2701,6 @@ swfdec_action_try (SwfdecAsContext *cx, guint action, const guint8 *data, guint } try_data = g_malloc0 (sizeof (TryData)); - swfdec_action_try_data_ref (try_data); swfdec_bits_init_data (&bits, data, len); @@ -2750,10 +2730,10 @@ swfdec_action_try (SwfdecAsContext *cx, guint action, const guint8 *data, guint if (try_data->catch_start || try_data->finally_start) { swfdec_a...
2007 Nov 22
0
5 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_debugger.c libswfdec/swfdec_movie.c libswfdec/swfdec_script.c libswfdec/swfdec_sprite_movie.c libswfdec/swfdec_tag.c libswfdec/swfdec_text_field.c
...c (string, '"'); diff --git a/libswfdec/swfdec_script.c b/libswfdec/swfdec_script.c index 2dd36be..ec73386 100644 --- a/libswfdec/swfdec_script.c +++ b/libswfdec/swfdec_script.c @@ -64,7 +64,7 @@ swfdec_constant_pool_new_from_action (const guint8 *data, guint len, guint versi pool = g_malloc0 (sizeof (SwfdecConstantPool) + (n - 1) * sizeof (char *)); pool->n_strings = n; for (i = 0; i < n; i++) { - pool->strings[i] = swfdec_bits_get_string_with_version (&bits, version); + pool->strings[i] = swfdec_bits_get_string (&bits, version); if (pool->string...
2007 Dec 10
0
5 commits - libswfdec/jpeg libswfdec/swfdec_as_interpret.c libswfdec/swfdec_bits.c libswfdec/swfdec_cached.c libswfdec/swfdec_codec_adpcm.c libswfdec/swfdec_codec_audio.c libswfdec/swfdec_flash_security.c libswfdec/swfdec_image.c
...Image *image) } else if (format == 5) { SwfdecBuffer *buffer; int i, j; + guint32 *p; + buffer = swfdec_bits_decompress (&bits, -1, 4 * image->width * image->height); if (buffer == NULL) { SWFDEC_ERROR ("failed to decompress data"); data = g_malloc0 (4 * image->width * image->height); goto out; } - ptr = data = buffer->data; + data = buffer->data; + p = (void *) data; /* image is stored in 0RGB format. We use ARGB/BGRA. */ for (j = 0; j < image->height; j++) { for (i = 0; i < image-&g...
2007 Apr 08
0
6 commits - libswfdec/Makefile.am libswfdec/swfdec_audio_flv.c libswfdec/swfdec_audio_flv.h libswfdec/swfdec_audio_stream.c libswfdec/swfdec_audio_stream.h libswfdec/swfdec_buffer.c libswfdec/swfdec_codec_adpcm.c libswfdec/swfdec_codec_audio.c
...a *data = datap; - SwfdecBuffer *out; - SwfdecBufferQueue *queue; + MadData *data = (MadData *) dec; + SwfdecBuffer *out, *empty = NULL; guint amount = 0, size; - queue = swfdec_buffer_queue_new (); + if (buffer == NULL) { + buffer = empty = swfdec_buffer_new (); + empty->data = g_malloc0 (MAD_BUFFER_GUARD * 3); + empty->length = MAD_BUFFER_GUARD * 3; + } //write (1, buffer->data, buffer->length); //g_print ("buffer %p gave us %u bytes\n", buffer, buffer->length); @@ -171,9 +176,8 @@ swfdec_codec_mad_decode (gpointer datap, mad_synth_frame...
2007 Oct 26
0
8 commits - doc/swfdec-sections.txt libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_interpret.c test/trace
...y_data; guint try_size; + gboolean use_finally, use_catch; if (len <= 8) { SWFDEC_ERROR ("With action requires a length of at least 8, but got %u", @@ -2727,18 +2727,22 @@ swfdec_action_try (SwfdecAsContext *cx, guint action, const guint8 *data, guint } try_data = g_malloc0 (sizeof (TryData)); + swfdec_action_try_data_ref (try_data); swfdec_bits_init_data (&bits, data, len); swfdec_bits_getbits (&bits, 5); // reserved try_data->use_register = swfdec_bits_getbit (&bits); - try_data->finally = swfdec_bits_getbit (&bits); - try_data-...