search for: free_root

Displaying 9 results from an estimated 9 matches for "free_root".

Did you mean: tree_root
2019 Aug 12
0
[PATCH libnbd 3/7] ocaml: Remove NBD.Buffer.free function, use a free callback instead.
...g & LIBNBD_CALLBACK_FREE) {\n"; - pr " caml_remove_generational_global_root ((value *)user_data);\n"; - pr " free (user_data);\n"; - pr " }\n"; + pr " if (valid_flag & LIBNBD_CALLBACK_FREE)\n"; + pr " free_root (NULL, user_data);\n"; pr "\n"; pr " return ret;\n"; pr "}\n"; @@ -5313,17 +5306,39 @@ let print_ocaml_binding (name, { args; optargs; ret }) = | BytesIn (n, count) -> pr " const void *%s = Bytes_val (%sv);\n" n...
2019 Aug 12
0
[PATCH libnbd 5/7] ocaml: Use free callback to free closure root, instead of valid_flag == FREE.
...r/generator @@ -5239,9 +5239,6 @@ let print_ocaml_binding (name, { args; optargs; ret }) = pr " caml_enter_blocking_section ();\n"; pr " }\n"; pr "\n"; - pr " if (valid_flag & LIBNBD_CALLBACK_FREE)\n"; - pr " free_root (NULL, user_data);\n"; - pr "\n"; pr " return ret;\n"; pr "}\n"; pr "\n" @@ -5348,7 +5345,11 @@ let print_ocaml_binding (name, { args; optargs; ret }) = pr " if (%s_user_data == NULL) caml_raise_out_of_memory...
2019 Aug 12
0
Re: [PATCH libnbd 1/7] api: Add semi-private function for freeing persistent data.
...ut_of_memory (); *buf_user_data = bufv; caml_register_generational_global_root (buf_user_data); struct nbd_buffer *buf_buf = NBD_buffer_val (bufv); const void *buf = buf_buf->data; size_t count = buf_buf->len; if (nbd_add_free_callback (h, (void *)buf, free_root, buf_user_data) == -1) caml_raise_out_of_memory (); Notice that the free_root function needs the pointer to the GC root, but you can't get to that from the buffer pointer. A similar problem will exist in Python, but I've not got around to writing that code yet. > > +C<ptr&gt...
2019 Aug 12
2
Re: [PATCH libnbd 1/7] api: Add semi-private function for freeing persistent data.
On 8/12/19 11:08 AM, Richard W.M. Jones wrote: > This adds a C-only semi-private function for freeing various types of > persistent data passed to libnbd. > > There are some similarities with nbd_add_close_callback which we > removed in commit 7f191b150b52ed50098976309a6af883d245fc56. > --- > +=head1 FREE CALLBACKS > + > +B<Note:> The API described in this
2019 Aug 12
14
[PATCH libnbd 0/7] Add free callbacks and remove valid_flag.
As proposed here: https://www.redhat.com/archives/libguestfs/2019-August/msg00130.html I didn't actually read Eric's replies to that yet because I've been concentrating on writing these patches all day. Anyway here they are and I'll look at what Eric said about the proposal next. Rich.
2019 Aug 12
2
Re: [PATCH libnbd 1/7] api: Add semi-private function for freeing persistent data.
...ata = bufv; > caml_register_generational_global_root (buf_user_data); > struct nbd_buffer *buf_buf = NBD_buffer_val (bufv); > const void *buf = buf_buf->data; > size_t count = buf_buf->len; > if (nbd_add_free_callback (h, (void *)buf, > free_root, buf_user_data) == -1) > caml_raise_out_of_memory (); > > Notice that the free_root function needs the pointer to the GC root, > but you can't get to that from the buffer pointer. But still, can't we create a single C struct that tracks both the buffer and the GC root, and...
2008 Dec 10
6
[PATCH 0/6] Clean up virtio device object handling [was Re: [PATCH] virtio: make PCI devices take a virtio_pci module ref]
(Moved from kvm at vger to virtualization at linux-foundation, changed subject, cleaned up cc list) On Wed, 2008-12-10 at 13:02 +0100, Kay Sievers wrote: > On Wed, Dec 10, 2008 at 10:49, Mark McLoughlin <markmc at redhat.com> wrote: > > On Tue, 2008-12-09 at 19:16 +0100, Kay Sievers wrote: > >> On Tue, Dec 9, 2008 at 17:41, Mark McLoughlin <markmc at redhat.com>
2008 Dec 10
6
[PATCH 0/6] Clean up virtio device object handling [was Re: [PATCH] virtio: make PCI devices take a virtio_pci module ref]
(Moved from kvm at vger to virtualization at linux-foundation, changed subject, cleaned up cc list) On Wed, 2008-12-10 at 13:02 +0100, Kay Sievers wrote: > On Wed, Dec 10, 2008 at 10:49, Mark McLoughlin <markmc at redhat.com> wrote: > > On Tue, 2008-12-09 at 19:16 +0100, Kay Sievers wrote: > >> On Tue, Dec 9, 2008 at 17:41, Mark McLoughlin <markmc at redhat.com>
2013 Jun 08
1
crash/mem violation in auth_worker + 50G logs in 2.1.7
...07fffa0863160 *** Jun 7 23:02:09 localhost dovecot: auth-worker: Error: ======= Backtrace: ========= Jun 7 23:02:09 localhost dovecot: auth-worker: Error: /lib/x86_64-linux-gnu/libc.so.6(+0x7eb96)[0x7f22d42f9b96] Jun 7 23:02:09 localhost dovecot: auth-worker: Error: /usr/lib/libmysqlclient.so.18(free_root+0x90)[0x7f22d37988c0] Jun 7 23:02:09 localhost dovecot: auth-worker: Error: /usr/lib/libmysqlclient.so.18(free_defaults+0x4b)[0x7f22d3796e6b] Jun 7 23:02:09 localhost dovecot: auth-worker: Error: /usr/lib/libmysqlclient.so.18(mysql_read_default_options+0x13c)[0x7f22d377d00c] Jun 7 23:02:09 local...