/work/include/glib-2.0/glib/gmem.h
Line | Count | Source |
1 | | /* GLIB - Library of useful routines for C programming |
2 | | * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald |
3 | | * |
4 | | * This library is free software; you can redistribute it and/or |
5 | | * modify it under the terms of the GNU Lesser General Public |
6 | | * License as published by the Free Software Foundation; either |
7 | | * version 2.1 of the License, or (at your option) any later version. |
8 | | * |
9 | | * This library is distributed in the hope that it will be useful, |
10 | | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 | | * Lesser General Public License for more details. |
13 | | * |
14 | | * You should have received a copy of the GNU Lesser General Public |
15 | | * License along with this library; if not, see <http://www.gnu.org/licenses/>. |
16 | | */ |
17 | | |
18 | | /* |
19 | | * Modified by the GLib Team and others 1997-2000. See the AUTHORS |
20 | | * file for a list of people on the GLib Team. See the ChangeLog |
21 | | * files for a list of changes. These files are distributed with |
22 | | * GLib at ftp://ftp.gtk.org/pub/gtk/. |
23 | | */ |
24 | | |
25 | | #ifndef __G_MEM_H__ |
26 | | #define __G_MEM_H__ |
27 | | |
28 | | #if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) |
29 | | #error "Only <glib.h> can be included directly." |
30 | | #endif |
31 | | |
32 | | #include <glib/gutils.h> |
33 | | |
34 | | #if defined(glib_typeof_2_68) && GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_68 |
35 | | /* for glib_typeof */ |
36 | | #include <type_traits> |
37 | | #endif |
38 | | |
39 | | G_BEGIN_DECLS |
40 | | |
41 | | /** |
42 | | * GMemVTable: |
43 | | * @malloc: function to use for allocating memory. |
44 | | * @realloc: function to use for reallocating memory. |
45 | | * @free: function to use to free memory. |
46 | | * @calloc: function to use for allocating zero-filled memory. |
47 | | * @try_malloc: function to use for allocating memory without a default error handler. |
48 | | * @try_realloc: function to use for reallocating memory without a default error handler. |
49 | | * |
50 | | * A set of functions used to perform memory allocation. The same #GMemVTable must |
51 | | * be used for all allocations in the same program; a call to g_mem_set_vtable(), |
52 | | * if it exists, should be prior to any use of GLib. |
53 | | * |
54 | | * This functions related to this has been deprecated in 2.46, and no longer work. |
55 | | */ |
56 | | typedef struct _GMemVTable GMemVTable; |
57 | | |
58 | | |
59 | | #if GLIB_SIZEOF_VOID_P > GLIB_SIZEOF_LONG |
60 | | /** |
61 | | * G_MEM_ALIGN: |
62 | | * |
63 | | * Indicates the number of bytes to which memory will be aligned on the |
64 | | * current platform. |
65 | | */ |
66 | | # define G_MEM_ALIGN GLIB_SIZEOF_VOID_P |
67 | | #else /* GLIB_SIZEOF_VOID_P <= GLIB_SIZEOF_LONG */ |
68 | | # define G_MEM_ALIGN GLIB_SIZEOF_LONG |
69 | | #endif /* GLIB_SIZEOF_VOID_P <= GLIB_SIZEOF_LONG */ |
70 | | |
71 | | |
72 | | /* Memory allocation functions |
73 | | */ |
74 | | |
75 | | GLIB_AVAILABLE_IN_ALL |
76 | | void g_free (gpointer mem); |
77 | | |
78 | | GLIB_AVAILABLE_IN_2_34 |
79 | | void g_clear_pointer (gpointer *pp, |
80 | | GDestroyNotify destroy); |
81 | | |
82 | | GLIB_AVAILABLE_IN_ALL |
83 | | gpointer g_malloc (gsize n_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1); |
84 | | GLIB_AVAILABLE_IN_ALL |
85 | | gpointer g_malloc0 (gsize n_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1); |
86 | | GLIB_AVAILABLE_IN_ALL |
87 | | gpointer g_realloc (gpointer mem, |
88 | | gsize n_bytes) G_GNUC_WARN_UNUSED_RESULT; |
89 | | GLIB_AVAILABLE_IN_ALL |
90 | | gpointer g_try_malloc (gsize n_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1); |
91 | | GLIB_AVAILABLE_IN_ALL |
92 | | gpointer g_try_malloc0 (gsize n_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1); |
93 | | GLIB_AVAILABLE_IN_ALL |
94 | | gpointer g_try_realloc (gpointer mem, |
95 | | gsize n_bytes) G_GNUC_WARN_UNUSED_RESULT; |
96 | | |
97 | | GLIB_AVAILABLE_IN_ALL |
98 | | gpointer g_malloc_n (gsize n_blocks, |
99 | | gsize n_block_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE2(1,2); |
100 | | GLIB_AVAILABLE_IN_ALL |
101 | | gpointer g_malloc0_n (gsize n_blocks, |
102 | | gsize n_block_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE2(1,2); |
103 | | GLIB_AVAILABLE_IN_ALL |
104 | | gpointer g_realloc_n (gpointer mem, |
105 | | gsize n_blocks, |
106 | | gsize n_block_bytes) G_GNUC_WARN_UNUSED_RESULT; |
107 | | GLIB_AVAILABLE_IN_ALL |
108 | | gpointer g_try_malloc_n (gsize n_blocks, |
109 | | gsize n_block_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE2(1,2); |
110 | | GLIB_AVAILABLE_IN_ALL |
111 | | gpointer g_try_malloc0_n (gsize n_blocks, |
112 | | gsize n_block_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE2(1,2); |
113 | | GLIB_AVAILABLE_IN_ALL |
114 | | gpointer g_try_realloc_n (gpointer mem, |
115 | | gsize n_blocks, |
116 | | gsize n_block_bytes) G_GNUC_WARN_UNUSED_RESULT; |
117 | | |
118 | | #if defined(glib_typeof) && GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_58 && (!defined(glib_typeof_2_68) || GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_68) |
119 | | #define g_clear_pointer(pp, destroy) \ |
120 | 4.63M | G_STMT_START \ |
121 | 4.63M | { \ |
122 | 4.63M | G_STATIC_ASSERT (sizeof *(pp) == sizeof (gpointer)); \ |
123 | 4.63M | glib_typeof ((pp)) _pp = (pp); \ |
124 | 4.63M | glib_typeof (*(pp)) _ptr = *_pp; \ |
125 | 4.63M | *_pp = NULL; \ |
126 | 4.63M | if (_ptr) \ |
127 | 4.63M | (destroy) (_ptr); \ |
128 | 4.63M | } \ |
129 | 4.63M | G_STMT_END \ |
130 | 1.54k | GLIB_AVAILABLE_MACRO_IN_2_34 |
131 | | #else /* __GNUC__ */ |
132 | | #define g_clear_pointer(pp, destroy) \ |
133 | | G_STMT_START { \ |
134 | | G_STATIC_ASSERT (sizeof *(pp) == sizeof (gpointer)); \ |
135 | | /* Only one access, please; work around type aliasing */ \ |
136 | | union { char *in; gpointer *out; } _pp; \ |
137 | | gpointer _p; \ |
138 | | /* This assignment is needed to avoid a gcc warning */ \ |
139 | | GDestroyNotify _destroy = (GDestroyNotify) (destroy); \ |
140 | | \ |
141 | | _pp.in = (char *) (pp); \ |
142 | | _p = *_pp.out; \ |
143 | | if (_p) \ |
144 | | { \ |
145 | | *_pp.out = NULL; \ |
146 | | _destroy (_p); \ |
147 | | } \ |
148 | | } G_STMT_END \ |
149 | | GLIB_AVAILABLE_MACRO_IN_2_34 |
150 | | #endif /* __GNUC__ */ |
151 | | |
152 | | /** |
153 | | * g_steal_pointer: |
154 | | * @pp: (not nullable): a pointer to a pointer |
155 | | * |
156 | | * Sets @pp to %NULL, returning the value that was there before. |
157 | | * |
158 | | * Conceptually, this transfers the ownership of the pointer from the |
159 | | * referenced variable to the "caller" of the macro (ie: "steals" the |
160 | | * reference). |
161 | | * |
162 | | * The return value will be properly typed, according to the type of |
163 | | * @pp. |
164 | | * |
165 | | * This can be very useful when combined with g_autoptr() to prevent the |
166 | | * return value of a function from being automatically freed. Consider |
167 | | * the following example (which only works on GCC and clang): |
168 | | * |
169 | | * |[ |
170 | | * GObject * |
171 | | * create_object (void) |
172 | | * { |
173 | | * g_autoptr(GObject) obj = g_object_new (G_TYPE_OBJECT, NULL); |
174 | | * |
175 | | * if (early_error_case) |
176 | | * return NULL; |
177 | | * |
178 | | * return g_steal_pointer (&obj); |
179 | | * } |
180 | | * ]| |
181 | | * |
182 | | * It can also be used in similar ways for 'out' parameters and is |
183 | | * particularly useful for dealing with optional out parameters: |
184 | | * |
185 | | * |[ |
186 | | * gboolean |
187 | | * get_object (GObject **obj_out) |
188 | | * { |
189 | | * g_autoptr(GObject) obj = g_object_new (G_TYPE_OBJECT, NULL); |
190 | | * |
191 | | * if (early_error_case) |
192 | | * return FALSE; |
193 | | * |
194 | | * if (obj_out) |
195 | | * *obj_out = g_steal_pointer (&obj); |
196 | | * |
197 | | * return TRUE; |
198 | | * } |
199 | | * ]| |
200 | | * |
201 | | * In the above example, the object will be automatically freed in the |
202 | | * early error case and also in the case that %NULL was given for |
203 | | * @obj_out. |
204 | | * |
205 | | * Since: 2.44 |
206 | | */ |
207 | | GLIB_AVAILABLE_STATIC_INLINE_IN_2_44 |
208 | | static inline gpointer |
209 | | g_steal_pointer (gpointer pp) |
210 | 96.6M | { |
211 | 96.6M | gpointer *ptr = (gpointer *) pp; |
212 | 96.6M | gpointer ref; |
213 | | |
214 | 96.6M | ref = *ptr; |
215 | 96.6M | *ptr = NULL; |
216 | | |
217 | 96.6M | return ref; |
218 | 96.6M | } fu-synaptics-cape-struct.c:g_steal_pointer Line | Count | Source | 210 | 169 | { | 211 | 169 | gpointer *ptr = (gpointer *) pp; | 212 | 169 | gpointer ref; | 213 | | | 214 | 169 | ref = *ptr; | 215 | 169 | *ptr = NULL; | 216 | | | 217 | 169 | return ref; | 218 | 169 | } |
Unexecuted instantiation: fu-synaptics-cape-firmware.c:g_steal_pointer fu-synaptics-cape-hid-firmware.c:g_steal_pointer Line | Count | Source | 210 | 159 | { | 211 | 159 | gpointer *ptr = (gpointer *) pp; | 212 | 159 | gpointer ref; | 213 | | | 214 | 159 | ref = *ptr; | 215 | 159 | *ptr = NULL; | 216 | | | 217 | 159 | return ref; | 218 | 159 | } |
Unexecuted instantiation: fu-synaptics-cape-sngl-firmware.c:g_steal_pointer Unexecuted instantiation: fwupd-bios-setting-struct.c:g_steal_pointer Unexecuted instantiation: fwupd-client-struct.c:g_steal_pointer Unexecuted instantiation: fwupd-codec-struct.c:g_steal_pointer Unexecuted instantiation: fwupd-device-struct.c:g_steal_pointer Unexecuted instantiation: fwupd-enums-struct.c:g_steal_pointer Unexecuted instantiation: fwupd-error-struct.c:g_steal_pointer Unexecuted instantiation: fwupd-json-struct.c:g_steal_pointer Unexecuted instantiation: fwupd-plugin-struct.c:g_steal_pointer Unexecuted instantiation: fwupd-release-struct.c:g_steal_pointer Unexecuted instantiation: fwupd-remote-struct.c:g_steal_pointer Unexecuted instantiation: fwupd-report-struct.c:g_steal_pointer Unexecuted instantiation: fwupd-request-struct.c:g_steal_pointer Unexecuted instantiation: fwupd-security-attr-struct.c:g_steal_pointer Unexecuted instantiation: fwupd-common.c:g_steal_pointer Unexecuted instantiation: fwupd-codec.c:g_steal_pointer Unexecuted instantiation: fwupd-device.c:g_steal_pointer Unexecuted instantiation: fwupd-error.c:g_steal_pointer Unexecuted instantiation: fwupd-bios-setting.c:g_steal_pointer Unexecuted instantiation: fwupd-json-array.c:g_steal_pointer Unexecuted instantiation: fwupd-json-common.c:g_steal_pointer fwupd-json-node.c:g_steal_pointer Line | Count | Source | 210 | 20.1k | { | 211 | 20.1k | gpointer *ptr = (gpointer *) pp; | 212 | 20.1k | gpointer ref; | 213 | | | 214 | 20.1k | ref = *ptr; | 215 | 20.1k | *ptr = NULL; | 216 | | | 217 | 20.1k | return ref; | 218 | 20.1k | } |
Unexecuted instantiation: fwupd-json-object.c:g_steal_pointer fwupd-json-parser.c:g_steal_pointer Line | Count | Source | 210 | 19.3k | { | 211 | 19.3k | gpointer *ptr = (gpointer *) pp; | 212 | 19.3k | gpointer ref; | 213 | | | 214 | 19.3k | ref = *ptr; | 215 | 19.3k | *ptr = NULL; | 216 | | | 217 | 19.3k | return ref; | 218 | 19.3k | } |
Unexecuted instantiation: fwupd-security-attr.c:g_steal_pointer Unexecuted instantiation: fwupd-release.c:g_steal_pointer Unexecuted instantiation: fwupd-report.c:g_steal_pointer Unexecuted instantiation: fwupd-request.c:g_steal_pointer Unexecuted instantiation: fu-crc-struct.c:g_steal_pointer Unexecuted instantiation: fu-progress-struct.c:g_steal_pointer Unexecuted instantiation: fu-common-struct.c:g_steal_pointer Unexecuted instantiation: fu-acpi-table-struct.c:g_steal_pointer fu-cab-struct.c:g_steal_pointer Line | Count | Source | 210 | 389k | { | 211 | 389k | gpointer *ptr = (gpointer *) pp; | 212 | 389k | gpointer ref; | 213 | | | 214 | 389k | ref = *ptr; | 215 | 389k | *ptr = NULL; | 216 | | | 217 | 389k | return ref; | 218 | 389k | } |
Unexecuted instantiation: fu-cfi-struct.c:g_steal_pointer Unexecuted instantiation: fu-cfu-struct.c:g_steal_pointer fu-cfu-firmware-struct.c:g_steal_pointer Line | Count | Source | 210 | 843k | { | 211 | 843k | gpointer *ptr = (gpointer *) pp; | 212 | 843k | gpointer ref; | 213 | | | 214 | 843k | ref = *ptr; | 215 | 843k | *ptr = NULL; | 216 | | | 217 | 843k | return ref; | 218 | 843k | } |
Unexecuted instantiation: fu-config-struct.c:g_steal_pointer Unexecuted instantiation: fu-coswid-struct.c:g_steal_pointer Unexecuted instantiation: fu-context-struct.c:g_steal_pointer Unexecuted instantiation: fu-device-struct.c:g_steal_pointer fu-dfu-firmware-struct.c:g_steal_pointer Line | Count | Source | 210 | 5.29k | { | 211 | 5.29k | gpointer *ptr = (gpointer *) pp; | 212 | 5.29k | gpointer ref; | 213 | | | 214 | 5.29k | ref = *ptr; | 215 | 5.29k | *ptr = NULL; | 216 | | | 217 | 5.29k | return ref; | 218 | 5.29k | } |
Unexecuted instantiation: fu-dpaux-struct.c:g_steal_pointer Unexecuted instantiation: fu-dump-struct.c:g_steal_pointer fu-edid-struct.c:g_steal_pointer Line | Count | Source | 210 | 1.12k | { | 211 | 1.12k | gpointer *ptr = (gpointer *) pp; | 212 | 1.12k | gpointer ref; | 213 | | | 214 | 1.12k | ref = *ptr; | 215 | 1.12k | *ptr = NULL; | 216 | | | 217 | 1.12k | return ref; | 218 | 1.12k | } |
fu-efi-struct.c:g_steal_pointer Line | Count | Source | 210 | 1.36M | { | 211 | 1.36M | gpointer *ptr = (gpointer *) pp; | 212 | 1.36M | gpointer ref; | 213 | | | 214 | 1.36M | ref = *ptr; | 215 | 1.36M | *ptr = NULL; | 216 | | | 217 | 1.36M | return ref; | 218 | 1.36M | } |
fu-elf-struct.c:g_steal_pointer Line | Count | Source | 210 | 16.4M | { | 211 | 16.4M | gpointer *ptr = (gpointer *) pp; | 212 | 16.4M | gpointer ref; | 213 | | | 214 | 16.4M | ref = *ptr; | 215 | 16.4M | *ptr = NULL; | 216 | | | 217 | 16.4M | return ref; | 218 | 16.4M | } |
fu-fdt-struct.c:g_steal_pointer Line | Count | Source | 210 | 237k | { | 211 | 237k | gpointer *ptr = (gpointer *) pp; | 212 | 237k | gpointer ref; | 213 | | | 214 | 237k | ref = *ptr; | 215 | 237k | *ptr = NULL; | 216 | | | 217 | 237k | return ref; | 218 | 237k | } |
Unexecuted instantiation: fu-firmware-struct.c:g_steal_pointer fu-fmap-struct.c:g_steal_pointer Line | Count | Source | 210 | 6.10M | { | 211 | 6.10M | gpointer *ptr = (gpointer *) pp; | 212 | 6.10M | gpointer ref; | 213 | | | 214 | 6.10M | ref = *ptr; | 215 | 6.10M | *ptr = NULL; | 216 | | | 217 | 6.10M | return ref; | 218 | 6.10M | } |
Unexecuted instantiation: fu-hid-struct.c:g_steal_pointer Unexecuted instantiation: fu-ifd-struct.c:g_steal_pointer fu-ifwi-struct.c:g_steal_pointer Line | Count | Source | 210 | 47.3k | { | 211 | 47.3k | gpointer *ptr = (gpointer *) pp; | 212 | 47.3k | gpointer ref; | 213 | | | 214 | 47.3k | ref = *ptr; | 215 | 47.3k | *ptr = NULL; | 216 | | | 217 | 47.3k | return ref; | 218 | 47.3k | } |
Unexecuted instantiation: fu-ihex-struct.c:g_steal_pointer Unexecuted instantiation: fu-intel-me-struct.c:g_steal_pointer Unexecuted instantiation: fu-intel-thunderbolt-struct.c:g_steal_pointer Unexecuted instantiation: fu-io-channel-struct.c:g_steal_pointer Unexecuted instantiation: fu-ioctl-struct.c:g_steal_pointer Unexecuted instantiation: fu-heci-struct.c:g_steal_pointer Unexecuted instantiation: fu-msgpack-struct.c:g_steal_pointer fu-oprom-struct.c:g_steal_pointer Line | Count | Source | 210 | 1.50k | { | 211 | 1.50k | gpointer *ptr = (gpointer *) pp; | 212 | 1.50k | gpointer ref; | 213 | | | 214 | 1.50k | ref = *ptr; | 215 | 1.50k | *ptr = NULL; | 216 | | | 217 | 1.50k | return ref; | 218 | 1.50k | } |
Unexecuted instantiation: fu-path-struct.c:g_steal_pointer fu-pefile-struct.c:g_steal_pointer Line | Count | Source | 210 | 22.3k | { | 211 | 22.3k | gpointer *ptr = (gpointer *) pp; | 212 | 22.3k | gpointer ref; | 213 | | | 214 | 22.3k | ref = *ptr; | 215 | 22.3k | *ptr = NULL; | 216 | | | 217 | 22.3k | return ref; | 218 | 22.3k | } |
Unexecuted instantiation: fu-pci-struct.c:g_steal_pointer Unexecuted instantiation: fu-processor-struct.c:g_steal_pointer Unexecuted instantiation: fu-protobuf-struct.c:g_steal_pointer Unexecuted instantiation: fu-quirks-struct.c:g_steal_pointer fu-sbatlevel-section-struct.c:g_steal_pointer Line | Count | Source | 210 | 123 | { | 211 | 123 | gpointer *ptr = (gpointer *) pp; | 212 | 123 | gpointer ref; | 213 | | | 214 | 123 | ref = *ptr; | 215 | 123 | *ptr = NULL; | 216 | | | 217 | 123 | return ref; | 218 | 123 | } |
Unexecuted instantiation: fu-security-attrs-struct.c:g_steal_pointer Unexecuted instantiation: fu-smbios-struct.c:g_steal_pointer Unexecuted instantiation: fu-srec-struct.c:g_steal_pointer Unexecuted instantiation: fu-tpm-struct.c:g_steal_pointer Unexecuted instantiation: fu-usb-device-ds20-struct.c:g_steal_pointer fu-usb-struct.c:g_steal_pointer Line | Count | Source | 210 | 9.73M | { | 211 | 9.73M | gpointer *ptr = (gpointer *) pp; | 212 | 9.73M | gpointer ref; | 213 | | | 214 | 9.73M | ref = *ptr; | 215 | 9.73M | *ptr = NULL; | 216 | | | 217 | 9.73M | return ref; | 218 | 9.73M | } |
fu-uswid-struct.c:g_steal_pointer Line | Count | Source | 210 | 42.2k | { | 211 | 42.2k | gpointer *ptr = (gpointer *) pp; | 212 | 42.2k | gpointer ref; | 213 | | | 214 | 42.2k | ref = *ptr; | 215 | 42.2k | *ptr = NULL; | 216 | | | 217 | 42.2k | return ref; | 218 | 42.2k | } |
Unexecuted instantiation: fu-v4l-struct.c:g_steal_pointer fu-zip-struct.c:g_steal_pointer Line | Count | Source | 210 | 53.1k | { | 211 | 53.1k | gpointer *ptr = (gpointer *) pp; | 212 | 53.1k | gpointer ref; | 213 | | | 214 | 53.1k | ref = *ptr; | 215 | 53.1k | *ptr = NULL; | 216 | | | 217 | 53.1k | return ref; | 218 | 53.1k | } |
Unexecuted instantiation: fu-acpi-table.c:g_steal_pointer Unexecuted instantiation: fu-backend.c:g_steal_pointer Unexecuted instantiation: fu-bios-setting.c:g_steal_pointer Unexecuted instantiation: fu-bios-settings.c:g_steal_pointer Unexecuted instantiation: fu-byte-array.c:g_steal_pointer Unexecuted instantiation: fu-bytes.c:g_steal_pointer fu-cab-firmware.c:g_steal_pointer Line | Count | Source | 210 | 3.61k | { | 211 | 3.61k | gpointer *ptr = (gpointer *) pp; | 212 | 3.61k | gpointer ref; | 213 | | | 214 | 3.61k | ref = *ptr; | 215 | 3.61k | *ptr = NULL; | 216 | | | 217 | 3.61k | return ref; | 218 | 3.61k | } |
Unexecuted instantiation: fu-cab-image.c:g_steal_pointer fu-cfu-offer.c:g_steal_pointer Line | Count | Source | 210 | 24 | { | 211 | 24 | gpointer *ptr = (gpointer *) pp; | 212 | 24 | gpointer ref; | 213 | | | 214 | 24 | ref = *ptr; | 215 | 24 | *ptr = NULL; | 216 | | | 217 | 24 | return ref; | 218 | 24 | } |
fu-cfu-payload.c:g_steal_pointer Line | Count | Source | 210 | 350 | { | 211 | 350 | gpointer *ptr = (gpointer *) pp; | 212 | 350 | gpointer ref; | 213 | | | 214 | 350 | ref = *ptr; | 215 | 350 | *ptr = NULL; | 216 | | | 217 | 350 | return ref; | 218 | 350 | } |
Unexecuted instantiation: fu-chunk.c:g_steal_pointer fu-chunk-array.c:g_steal_pointer Line | Count | Source | 210 | 1.15M | { | 211 | 1.15M | gpointer *ptr = (gpointer *) pp; | 212 | 1.15M | gpointer ref; | 213 | | | 214 | 1.15M | ref = *ptr; | 215 | 1.15M | *ptr = NULL; | 216 | | | 217 | 1.15M | return ref; | 218 | 1.15M | } |
Unexecuted instantiation: fu-common.c:g_steal_pointer Unexecuted instantiation: fu-composite-input-stream.c:g_steal_pointer Unexecuted instantiation: fu-config.c:g_steal_pointer Unexecuted instantiation: fu-context.c:g_steal_pointer fu-coswid-common.c:g_steal_pointer Line | Count | Source | 210 | 92.1k | { | 211 | 92.1k | gpointer *ptr = (gpointer *) pp; | 212 | 92.1k | gpointer ref; | 213 | | | 214 | 92.1k | ref = *ptr; | 215 | 92.1k | *ptr = NULL; | 216 | | | 217 | 92.1k | return ref; | 218 | 92.1k | } |
fu-coswid-firmware.c:g_steal_pointer Line | Count | Source | 210 | 2.53M | { | 211 | 2.53M | gpointer *ptr = (gpointer *) pp; | 212 | 2.53M | gpointer ref; | 213 | | | 214 | 2.53M | ref = *ptr; | 215 | 2.53M | *ptr = NULL; | 216 | | | 217 | 2.53M | return ref; | 218 | 2.53M | } |
Unexecuted instantiation: fu-crc.c:g_steal_pointer fu-csv-entry.c:g_steal_pointer Line | Count | Source | 210 | 151k | { | 211 | 151k | gpointer *ptr = (gpointer *) pp; | 212 | 151k | gpointer ref; | 213 | | | 214 | 151k | ref = *ptr; | 215 | 151k | *ptr = NULL; | 216 | | | 217 | 151k | return ref; | 218 | 151k | } |
fu-csv-firmware.c:g_steal_pointer Line | Count | Source | 210 | 2.18k | { | 211 | 2.18k | gpointer *ptr = (gpointer *) pp; | 212 | 2.18k | gpointer ref; | 213 | | | 214 | 2.18k | ref = *ptr; | 215 | 2.18k | *ptr = NULL; | 216 | | | 217 | 2.18k | return ref; | 218 | 2.18k | } |
Unexecuted instantiation: fu-device.c:g_steal_pointer Unexecuted instantiation: fu-device-event.c:g_steal_pointer Unexecuted instantiation: fu-device-locker.c:g_steal_pointer fu-dfu-firmware.c:g_steal_pointer Line | Count | Source | 210 | 152 | { | 211 | 152 | gpointer *ptr = (gpointer *) pp; | 212 | 152 | gpointer ref; | 213 | | | 214 | 152 | ref = *ptr; | 215 | 152 | *ptr = NULL; | 216 | | | 217 | 152 | return ref; | 218 | 152 | } |
fu-dfuse-firmware.c:g_steal_pointer Line | Count | Source | 210 | 4.16k | { | 211 | 4.16k | gpointer *ptr = (gpointer *) pp; | 212 | 4.16k | gpointer ref; | 213 | | | 214 | 4.16k | ref = *ptr; | 215 | 4.16k | *ptr = NULL; | 216 | | | 217 | 4.16k | return ref; | 218 | 4.16k | } |
Unexecuted instantiation: fu-dummy-efivars.c:g_steal_pointer Unexecuted instantiation: fu-dump.c:g_steal_pointer fu-edid.c:g_steal_pointer Line | Count | Source | 210 | 386 | { | 211 | 386 | gpointer *ptr = (gpointer *) pp; | 212 | 386 | gpointer ref; | 213 | | | 214 | 386 | ref = *ptr; | 215 | 386 | *ptr = NULL; | 216 | | | 217 | 386 | return ref; | 218 | 386 | } |
Unexecuted instantiation: fu-efi-common.c:g_steal_pointer fu-efi-device-path.c:g_steal_pointer Line | Count | Source | 210 | 4.80k | { | 211 | 4.80k | gpointer *ptr = (gpointer *) pp; | 212 | 4.80k | gpointer ref; | 213 | | | 214 | 4.80k | ref = *ptr; | 215 | 4.80k | *ptr = NULL; | 216 | | | 217 | 4.80k | return ref; | 218 | 4.80k | } |
fu-efi-device-path-list.c:g_steal_pointer Line | Count | Source | 210 | 737 | { | 211 | 737 | gpointer *ptr = (gpointer *) pp; | 212 | 737 | gpointer ref; | 213 | | | 214 | 737 | ref = *ptr; | 215 | 737 | *ptr = NULL; | 216 | | | 217 | 737 | return ref; | 218 | 737 | } |
Unexecuted instantiation: fu-efi-file-path-device-path.c:g_steal_pointer fu-efi-file.c:g_steal_pointer Line | Count | Source | 210 | 1.93k | { | 211 | 1.93k | gpointer *ptr = (gpointer *) pp; | 212 | 1.93k | gpointer ref; | 213 | | | 214 | 1.93k | ref = *ptr; | 215 | 1.93k | *ptr = NULL; | 216 | | | 217 | 1.93k | return ref; | 218 | 1.93k | } |
fu-efi-filesystem.c:g_steal_pointer Line | Count | Source | 210 | 551 | { | 211 | 551 | gpointer *ptr = (gpointer *) pp; | 212 | 551 | gpointer ref; | 213 | | | 214 | 551 | ref = *ptr; | 215 | 551 | *ptr = NULL; | 216 | | | 217 | 551 | return ref; | 218 | 551 | } |
fu-efi-section.c:g_steal_pointer Line | Count | Source | 210 | 2.55k | { | 211 | 2.55k | gpointer *ptr = (gpointer *) pp; | 212 | 2.55k | gpointer ref; | 213 | | | 214 | 2.55k | ref = *ptr; | 215 | 2.55k | *ptr = NULL; | 216 | | | 217 | 2.55k | return ref; | 218 | 2.55k | } |
fu-efi-volume.c:g_steal_pointer Line | Count | Source | 210 | 3.72k | { | 211 | 3.72k | gpointer *ptr = (gpointer *) pp; | 212 | 3.72k | gpointer ref; | 213 | | | 214 | 3.72k | ref = *ptr; | 215 | 3.72k | *ptr = NULL; | 216 | | | 217 | 3.72k | return ref; | 218 | 3.72k | } |
fu-efi-lz77-decompressor.c:g_steal_pointer Line | Count | Source | 210 | 3.33k | { | 211 | 3.33k | gpointer *ptr = (gpointer *) pp; | 212 | 3.33k | gpointer ref; | 213 | | | 214 | 3.33k | ref = *ptr; | 215 | 3.33k | *ptr = NULL; | 216 | | | 217 | 3.33k | return ref; | 218 | 3.33k | } |
fu-efi-hard-drive-device-path.c:g_steal_pointer Line | Count | Source | 210 | 387 | { | 211 | 387 | gpointer *ptr = (gpointer *) pp; | 212 | 387 | gpointer ref; | 213 | | | 214 | 387 | ref = *ptr; | 215 | 387 | *ptr = NULL; | 216 | | | 217 | 387 | return ref; | 218 | 387 | } |
fu-efi-load-option.c:g_steal_pointer Line | Count | Source | 210 | 1.50k | { | 211 | 1.50k | gpointer *ptr = (gpointer *) pp; | 212 | 1.50k | gpointer ref; | 213 | | | 214 | 1.50k | ref = *ptr; | 215 | 1.50k | *ptr = NULL; | 216 | | | 217 | 1.50k | return ref; | 218 | 1.50k | } |
Unexecuted instantiation: fu-efi-signature.c:g_steal_pointer Unexecuted instantiation: fu-efi-signature-list.c:g_steal_pointer fu-efi-vss2-variable-store.c:g_steal_pointer Line | Count | Source | 210 | 461 | { | 211 | 461 | gpointer *ptr = (gpointer *) pp; | 212 | 461 | gpointer ref; | 213 | | | 214 | 461 | ref = *ptr; | 215 | 461 | *ptr = NULL; | 216 | | | 217 | 461 | return ref; | 218 | 461 | } |
fu-efi-vss-auth-variable.c:g_steal_pointer Line | Count | Source | 210 | 1.13k | { | 211 | 1.13k | gpointer *ptr = (gpointer *) pp; | 212 | 1.13k | gpointer ref; | 213 | | | 214 | 1.13k | ref = *ptr; | 215 | 1.13k | *ptr = NULL; | 216 | | | 217 | 1.13k | return ref; | 218 | 1.13k | } |
fu-efi-ftw-store.c:g_steal_pointer Line | Count | Source | 210 | 168 | { | 211 | 168 | gpointer *ptr = (gpointer *) pp; | 212 | 168 | gpointer ref; | 213 | | | 214 | 168 | ref = *ptr; | 215 | 168 | *ptr = NULL; | 216 | | | 217 | 168 | return ref; | 218 | 168 | } |
Unexecuted instantiation: fu-efivars.c:g_steal_pointer Unexecuted instantiation: fu-efi-x509-signature.c:g_steal_pointer fu-elf-firmware.c:g_steal_pointer Line | Count | Source | 210 | 13.3M | { | 211 | 13.3M | gpointer *ptr = (gpointer *) pp; | 212 | 13.3M | gpointer ref; | 213 | | | 214 | 13.3M | ref = *ptr; | 215 | 13.3M | *ptr = NULL; | 216 | | | 217 | 13.3M | return ref; | 218 | 13.3M | } |
fu-fdt-firmware.c:g_steal_pointer Line | Count | Source | 210 | 137k | { | 211 | 137k | gpointer *ptr = (gpointer *) pp; | 212 | 137k | gpointer ref; | 213 | | | 214 | 137k | ref = *ptr; | 215 | 137k | *ptr = NULL; | 216 | | | 217 | 137k | return ref; | 218 | 137k | } |
Unexecuted instantiation: fu-fdt-image.c:g_steal_pointer fu-firmware.c:g_steal_pointer Line | Count | Source | 210 | 393k | { | 211 | 393k | gpointer *ptr = (gpointer *) pp; | 212 | 393k | gpointer ref; | 213 | | | 214 | 393k | ref = *ptr; | 215 | 393k | *ptr = NULL; | 216 | | | 217 | 393k | return ref; | 218 | 393k | } |
Unexecuted instantiation: fu-firmware-common.c:g_steal_pointer Unexecuted instantiation: fu-fit-firmware.c:g_steal_pointer fu-fmap-firmware.c:g_steal_pointer Line | Count | Source | 210 | 118 | { | 211 | 118 | gpointer *ptr = (gpointer *) pp; | 212 | 118 | gpointer ref; | 213 | | | 214 | 118 | ref = *ptr; | 215 | 118 | *ptr = NULL; | 216 | | | 217 | 118 | return ref; | 218 | 118 | } |
Unexecuted instantiation: fu-fuzzer.c:g_steal_pointer fu-hid-descriptor.c:g_steal_pointer Line | Count | Source | 210 | 955 | { | 211 | 955 | gpointer *ptr = (gpointer *) pp; | 212 | 955 | gpointer ref; | 213 | | | 214 | 955 | ref = *ptr; | 215 | 955 | *ptr = NULL; | 216 | | | 217 | 955 | return ref; | 218 | 955 | } |
fu-hid-report-item.c:g_steal_pointer Line | Count | Source | 210 | 6.48k | { | 211 | 6.48k | gpointer *ptr = (gpointer *) pp; | 212 | 6.48k | gpointer ref; | 213 | | | 214 | 6.48k | ref = *ptr; | 215 | 6.48k | *ptr = NULL; | 216 | | | 217 | 6.48k | return ref; | 218 | 6.48k | } |
Unexecuted instantiation: fu-hid-report.c:g_steal_pointer Unexecuted instantiation: fu-hwids.c:g_steal_pointer Unexecuted instantiation: fu-hwids-config.c:g_steal_pointer Unexecuted instantiation: fu-hwids-dmi.c:g_steal_pointer Unexecuted instantiation: fu-hwids-fdt.c:g_steal_pointer Unexecuted instantiation: fu-hwids-kenv.c:g_steal_pointer Unexecuted instantiation: fu-hwids-darwin.c:g_steal_pointer Unexecuted instantiation: fu-hwids-smbios.c:g_steal_pointer Unexecuted instantiation: fu-ifd-bios.c:g_steal_pointer Unexecuted instantiation: fu-ifd-firmware.c:g_steal_pointer fu-ifd-image.c:g_steal_pointer Line | Count | Source | 210 | 664 | { | 211 | 664 | gpointer *ptr = (gpointer *) pp; | 212 | 664 | gpointer ref; | 213 | | | 214 | 664 | ref = *ptr; | 215 | 664 | *ptr = NULL; | 216 | | | 217 | 664 | return ref; | 218 | 664 | } |
fu-ifwi-cpd-firmware.c:g_steal_pointer Line | Count | Source | 210 | 3 | { | 211 | 3 | gpointer *ptr = (gpointer *) pp; | 212 | 3 | gpointer ref; | 213 | | | 214 | 3 | ref = *ptr; | 215 | 3 | *ptr = NULL; | 216 | | | 217 | 3 | return ref; | 218 | 3 | } |
fu-ifwi-fpt-firmware.c:g_steal_pointer Line | Count | Source | 210 | 1 | { | 211 | 1 | gpointer *ptr = (gpointer *) pp; | 212 | 1 | gpointer ref; | 213 | | | 214 | 1 | ref = *ptr; | 215 | 1 | *ptr = NULL; | 216 | | | 217 | 1 | return ref; | 218 | 1 | } |
fu-ihex-firmware.c:g_steal_pointer Line | Count | Source | 210 | 592k | { | 211 | 592k | gpointer *ptr = (gpointer *) pp; | 212 | 592k | gpointer ref; | 213 | | | 214 | 592k | ref = *ptr; | 215 | 592k | *ptr = NULL; | 216 | | | 217 | 592k | return ref; | 218 | 592k | } |
fu-input-stream.c:g_steal_pointer Line | Count | Source | 210 | 35.6M | { | 211 | 35.6M | gpointer *ptr = (gpointer *) pp; | 212 | 35.6M | gpointer ref; | 213 | | | 214 | 35.6M | ref = *ptr; | 215 | 35.6M | *ptr = NULL; | 216 | | | 217 | 35.6M | return ref; | 218 | 35.6M | } |
Unexecuted instantiation: fu-intel-me-device.c:g_steal_pointer fu-intel-thunderbolt-firmware.c:g_steal_pointer Line | Count | Source | 210 | 72 | { | 211 | 72 | gpointer *ptr = (gpointer *) pp; | 212 | 72 | gpointer ref; | 213 | | | 214 | 72 | ref = *ptr; | 215 | 72 | *ptr = NULL; | 216 | | | 217 | 72 | return ref; | 218 | 72 | } |
fu-intel-thunderbolt-nvm.c:g_steal_pointer Line | Count | Source | 210 | 72 | { | 211 | 72 | gpointer *ptr = (gpointer *) pp; | 212 | 72 | gpointer ref; | 213 | | | 214 | 72 | ref = *ptr; | 215 | 72 | *ptr = NULL; | 216 | | | 217 | 72 | return ref; | 218 | 72 | } |
Unexecuted instantiation: fu-io-channel.c:g_steal_pointer Unexecuted instantiation: fu-ioctl.c:g_steal_pointer fu-json-firmware.c:g_steal_pointer Line | Count | Source | 210 | 756 | { | 211 | 756 | gpointer *ptr = (gpointer *) pp; | 212 | 756 | gpointer ref; | 213 | | | 214 | 756 | ref = *ptr; | 215 | 756 | *ptr = NULL; | 216 | | | 217 | 756 | return ref; | 218 | 756 | } |
Unexecuted instantiation: fu-kenv.c:g_steal_pointer Unexecuted instantiation: fu-kernel.c:g_steal_pointer Unexecuted instantiation: fu-kernel-search-path.c:g_steal_pointer Unexecuted instantiation: fu-linear-firmware.c:g_steal_pointer Unexecuted instantiation: fu-lzma-common.c:g_steal_pointer Line | Count | Source | 210 | 120k | { | 211 | 120k | gpointer *ptr = (gpointer *) pp; | 212 | 120k | gpointer ref; | 213 | | | 214 | 120k | ref = *ptr; | 215 | 120k | *ptr = NULL; | 216 | | | 217 | 120k | return ref; | 218 | 120k | } |
fu-oprom-firmware.c:g_steal_pointer Line | Count | Source | 210 | 696 | { | 211 | 696 | gpointer *ptr = (gpointer *) pp; | 212 | 696 | gpointer ref; | 213 | | | 214 | 696 | ref = *ptr; | 215 | 696 | *ptr = NULL; | 216 | | | 217 | 696 | return ref; | 218 | 696 | } |
fu-partial-input-stream.c:g_steal_pointer Line | Count | Source | 210 | 4.28M | { | 211 | 4.28M | gpointer *ptr = (gpointer *) pp; | 212 | 4.28M | gpointer ref; | 213 | | | 214 | 4.28M | ref = *ptr; | 215 | 4.28M | *ptr = NULL; | 216 | | | 217 | 4.28M | return ref; | 218 | 4.28M | } |
Unexecuted instantiation: fu-path.c:g_steal_pointer Unexecuted instantiation: fu-path-store.c:g_steal_pointer fu-pefile-firmware.c:g_steal_pointer Line | Count | Source | 210 | 6.65k | { | 211 | 6.65k | gpointer *ptr = (gpointer *) pp; | 212 | 6.65k | gpointer ref; | 213 | | | 214 | 6.65k | ref = *ptr; | 215 | 6.65k | *ptr = NULL; | 216 | | | 217 | 6.65k | return ref; | 218 | 6.65k | } |
fu-protobuf.c:g_steal_pointer Line | Count | Source | 210 | 243 | { | 211 | 243 | gpointer *ptr = (gpointer *) pp; | 212 | 243 | gpointer ref; | 213 | | | 214 | 243 | ref = *ptr; | 215 | 243 | *ptr = NULL; | 216 | | | 217 | 243 | return ref; | 218 | 243 | } |
Unexecuted instantiation: fu-output-stream.c:g_steal_pointer Unexecuted instantiation: fu-progress.c:g_steal_pointer Unexecuted instantiation: fu-quirks.c:g_steal_pointer fu-sbatlevel-section.c:g_steal_pointer Line | Count | Source | 210 | 16 | { | 211 | 16 | gpointer *ptr = (gpointer *) pp; | 212 | 16 | gpointer ref; | 213 | | | 214 | 16 | ref = *ptr; | 215 | 16 | *ptr = NULL; | 216 | | | 217 | 16 | return ref; | 218 | 16 | } |
Unexecuted instantiation: fu-security-attr.c:g_steal_pointer Unexecuted instantiation: fu-security-attrs.c:g_steal_pointer Unexecuted instantiation: fu-smbios.c:g_steal_pointer fu-srec-firmware.c:g_steal_pointer Line | Count | Source | 210 | 1.15M | { | 211 | 1.15M | gpointer *ptr = (gpointer *) pp; | 212 | 1.15M | gpointer ref; | 213 | | | 214 | 1.15M | ref = *ptr; | 215 | 1.15M | *ptr = NULL; | 216 | | | 217 | 1.15M | return ref; | 218 | 1.15M | } |
fu-string.c:g_steal_pointer Line | Count | Source | 210 | 127k | { | 211 | 127k | gpointer *ptr = (gpointer *) pp; | 212 | 127k | gpointer ref; | 213 | | | 214 | 127k | ref = *ptr; | 215 | 127k | *ptr = NULL; | 216 | | | 217 | 127k | return ref; | 218 | 127k | } |
Unexecuted instantiation: fu-sum.c:g_steal_pointer Unexecuted instantiation: fu-temporary-directory.c:g_steal_pointer Unexecuted instantiation: fu-tpm-eventlog-item.c:g_steal_pointer Unexecuted instantiation: fu-tpm-eventlog.c:g_steal_pointer Unexecuted instantiation: fu-tpm-eventlog-v1.c:g_steal_pointer Unexecuted instantiation: fu-tpm-eventlog-v2.c:g_steal_pointer Unexecuted instantiation: fu-udev-device.c:g_steal_pointer Unexecuted instantiation: fu-usb-bos-descriptor.c:g_steal_pointer Unexecuted instantiation: fu-usb-config-descriptor.c:g_steal_pointer Unexecuted instantiation: fu-usb-descriptor.c:g_steal_pointer fu-usb-device.c:g_steal_pointer Line | Count | Source | 210 | 161k | { | 211 | 161k | gpointer *ptr = (gpointer *) pp; | 212 | 161k | gpointer ref; | 213 | | | 214 | 161k | ref = *ptr; | 215 | 161k | *ptr = NULL; | 216 | | | 217 | 161k | return ref; | 218 | 161k | } |
Unexecuted instantiation: fu-usb-device-ds20.c:g_steal_pointer Unexecuted instantiation: fu-usb-device-fw-ds20.c:g_steal_pointer Unexecuted instantiation: fu-usb-device-ms-ds20.c:g_steal_pointer Unexecuted instantiation: fu-usb-endpoint.c:g_steal_pointer Unexecuted instantiation: fu-usb-hid-descriptor.c:g_steal_pointer Unexecuted instantiation: fu-usb-interface.c:g_steal_pointer fu-uswid-firmware.c:g_steal_pointer Line | Count | Source | 210 | 1.41k | { | 211 | 1.41k | gpointer *ptr = (gpointer *) pp; | 212 | 1.41k | gpointer ref; | 213 | | | 214 | 1.41k | ref = *ptr; | 215 | 1.41k | *ptr = NULL; | 216 | | | 217 | 1.41k | return ref; | 218 | 1.41k | } |
Unexecuted instantiation: fu-version-common.c:g_steal_pointer Unexecuted instantiation: fu-volume.c:g_steal_pointer Unexecuted instantiation: fu-volume-locker.c:g_steal_pointer Unexecuted instantiation: fu-x509-certificate.c:g_steal_pointer Unexecuted instantiation: fu-xor.c:g_steal_pointer fu-zip-firmware.c:g_steal_pointer Line | Count | Source | 210 | 15.9k | { | 211 | 15.9k | gpointer *ptr = (gpointer *) pp; | 212 | 15.9k | gpointer ref; | 213 | | | 214 | 15.9k | ref = *ptr; | 215 | 15.9k | *ptr = NULL; | 216 | | | 217 | 15.9k | return ref; | 218 | 15.9k | } |
Unexecuted instantiation: fu-zip-file.c:g_steal_pointer Unexecuted instantiation: fu-common-linux.c:g_steal_pointer Unexecuted instantiation: fu-darwin-efivars.c:g_steal_pointer Unexecuted instantiation: fu-fuzzer-firmware.c:g_steal_pointer Unexecuted instantiation: xb-builder.c:g_steal_pointer Unexecuted instantiation: xb-builder-fixup.c:g_steal_pointer xb-builder-node.c:g_steal_pointer Line | Count | Source | 210 | 160k | { | 211 | 160k | gpointer *ptr = (gpointer *) pp; | 212 | 160k | gpointer ref; | 213 | | | 214 | 160k | ref = *ptr; | 215 | 160k | *ptr = NULL; | 216 | | | 217 | 160k | return ref; | 218 | 160k | } |
Unexecuted instantiation: xb-builder-source.c:g_steal_pointer Unexecuted instantiation: xb-builder-source-ctx.c:g_steal_pointer Unexecuted instantiation: xb-common.c:g_steal_pointer Unexecuted instantiation: xb-node.c:g_steal_pointer Unexecuted instantiation: xb-node-query.c:g_steal_pointer Unexecuted instantiation: xb-query.c:g_steal_pointer Unexecuted instantiation: xb-query-context.c:g_steal_pointer Unexecuted instantiation: xb-silo.c:g_steal_pointer Unexecuted instantiation: xb-silo-export.c:g_steal_pointer Unexecuted instantiation: xb-silo-query.c:g_steal_pointer Unexecuted instantiation: xb-stack.c:g_steal_pointer Unexecuted instantiation: xb-string.c:g_steal_pointer Unexecuted instantiation: xb-value-bindings.c:g_steal_pointer Unexecuted instantiation: xb-version.c:g_steal_pointer Unexecuted instantiation: xb-zstd-decompressor.c:g_steal_pointer Unexecuted instantiation: xb-lzma-decompressor.c:g_steal_pointer Unexecuted instantiation: xb-machine.c:g_steal_pointer Unexecuted instantiation: xb-opcode.c:g_steal_pointer fu-ccgx-struct.c:g_steal_pointer Line | Count | Source | 210 | 213 | { | 211 | 213 | gpointer *ptr = (gpointer *) pp; | 212 | 213 | gpointer ref; | 213 | | | 214 | 213 | ref = *ptr; | 215 | 213 | *ptr = NULL; | 216 | | | 217 | 213 | return ref; | 218 | 213 | } |
Unexecuted instantiation: fu-ccgx-pure-hid-struct.c:g_steal_pointer Unexecuted instantiation: fu-ccgx-common.c:g_steal_pointer fu-ccgx-firmware.c:g_steal_pointer Line | Count | Source | 210 | 710k | { | 211 | 710k | gpointer *ptr = (gpointer *) pp; | 212 | 710k | gpointer ref; | 213 | | | 214 | 710k | ref = *ptr; | 215 | 710k | *ptr = NULL; | 216 | | | 217 | 710k | return ref; | 218 | 710k | } |
fu-genesys-usbhub-struct.c:g_steal_pointer Line | Count | Source | 210 | 746 | { | 211 | 746 | gpointer *ptr = (gpointer *) pp; | 212 | 746 | gpointer ref; | 213 | | | 214 | 746 | ref = *ptr; | 215 | 746 | *ptr = NULL; | 216 | | | 217 | 746 | return ref; | 218 | 746 | } |
Unexecuted instantiation: fu-genesys-scaler-firmware.c:g_steal_pointer fu-genesys-usbhub-firmware.c:g_steal_pointer Line | Count | Source | 210 | 89 | { | 211 | 89 | gpointer *ptr = (gpointer *) pp; | 212 | 89 | gpointer ref; | 213 | | | 214 | 89 | ref = *ptr; | 215 | 89 | *ptr = NULL; | 216 | | | 217 | 89 | return ref; | 218 | 89 | } |
Unexecuted instantiation: fu-genesys-usbhub-dev-firmware.c:g_steal_pointer Unexecuted instantiation: fu-genesys-usbhub-pd-firmware.c:g_steal_pointer Unexecuted instantiation: fu-genesys-usbhub-codesign-firmware.c:g_steal_pointer Unexecuted instantiation: fu-cros-ec-struct.c:g_steal_pointer Unexecuted instantiation: fu-cros-ec-common.c:g_steal_pointer Unexecuted instantiation: fu-cros-ec-firmware.c:g_steal_pointer fu-acpi-phat-struct.c:g_steal_pointer Line | Count | Source | 210 | 33.3k | { | 211 | 33.3k | gpointer *ptr = (gpointer *) pp; | 212 | 33.3k | gpointer ref; | 213 | | | 214 | 33.3k | ref = *ptr; | 215 | 33.3k | *ptr = NULL; | 216 | | | 217 | 33.3k | return ref; | 218 | 33.3k | } |
fu-acpi-phat.c:g_steal_pointer Line | Count | Source | 210 | 494 | { | 211 | 494 | gpointer *ptr = (gpointer *) pp; | 212 | 494 | gpointer ref; | 213 | | | 214 | 494 | ref = *ptr; | 215 | 494 | *ptr = NULL; | 216 | | | 217 | 494 | return ref; | 218 | 494 | } |
fu-acpi-phat-health-record.c:g_steal_pointer Line | Count | Source | 210 | 1.19k | { | 211 | 1.19k | gpointer *ptr = (gpointer *) pp; | 212 | 1.19k | gpointer ref; | 213 | | | 214 | 1.19k | ref = *ptr; | 215 | 1.19k | *ptr = NULL; | 216 | | | 217 | 1.19k | return ref; | 218 | 1.19k | } |
fu-acpi-phat-version-element.c:g_steal_pointer Line | Count | Source | 210 | 3.01k | { | 211 | 3.01k | gpointer *ptr = (gpointer *) pp; | 212 | 3.01k | gpointer ref; | 213 | | | 214 | 3.01k | ref = *ptr; | 215 | 3.01k | *ptr = NULL; | 216 | | | 217 | 3.01k | return ref; | 218 | 3.01k | } |
fu-acpi-phat-version-record.c:g_steal_pointer Line | Count | Source | 210 | 8.64k | { | 211 | 8.64k | gpointer *ptr = (gpointer *) pp; | 212 | 8.64k | gpointer ref; | 213 | | | 214 | 8.64k | ref = *ptr; | 215 | 8.64k | *ptr = NULL; | 216 | | | 217 | 8.64k | return ref; | 218 | 8.64k | } |
Unexecuted instantiation: fu-pixart-rf-struct.c:g_steal_pointer Unexecuted instantiation: fu-pixart-rf-common.c:g_steal_pointer Unexecuted instantiation: fu-pixart-rf-firmware.c:g_steal_pointer fu-ebitdo-struct.c:g_steal_pointer Line | Count | Source | 210 | 300 | { | 211 | 300 | gpointer *ptr = (gpointer *) pp; | 212 | 300 | gpointer ref; | 213 | | | 214 | 300 | ref = *ptr; | 215 | 300 | *ptr = NULL; | 216 | | | 217 | 300 | return ref; | 218 | 300 | } |
fu-ebitdo-firmware.c:g_steal_pointer Line | Count | Source | 210 | 172 | { | 211 | 172 | gpointer *ptr = (gpointer *) pp; | 212 | 172 | gpointer ref; | 213 | | | 214 | 172 | ref = *ptr; | 215 | 172 | *ptr = NULL; | 216 | | | 217 | 172 | return ref; | 218 | 172 | } |
fu-uf2-struct.c:g_steal_pointer Line | Count | Source | 210 | 14.2k | { | 211 | 14.2k | gpointer *ptr = (gpointer *) pp; | 212 | 14.2k | gpointer ref; | 213 | | | 214 | 14.2k | ref = *ptr; | 215 | 14.2k | *ptr = NULL; | 216 | | | 217 | 14.2k | return ref; | 218 | 14.2k | } |
fu-uf2-firmware.c:g_steal_pointer Line | Count | Source | 210 | 2.08k | { | 211 | 2.08k | gpointer *ptr = (gpointer *) pp; | 212 | 2.08k | gpointer ref; | 213 | | | 214 | 2.08k | ref = *ptr; | 215 | 2.08k | *ptr = NULL; | 216 | | | 217 | 2.08k | return ref; | 218 | 2.08k | } |
Unexecuted instantiation: fu-hughski-colorhug-struct.c:g_steal_pointer fu-hughski-colorhug-device.c:g_steal_pointer Line | Count | Source | 210 | 120 | { | 211 | 120 | gpointer *ptr = (gpointer *) pp; | 212 | 120 | gpointer ref; | 213 | | | 214 | 120 | ref = *ptr; | 215 | 120 | *ptr = NULL; | 216 | | | 217 | 120 | return ref; | 218 | 120 | } |
Unexecuted instantiation: fu-wacom-usb-struct.c:g_steal_pointer fu-wacom-usb-firmware.c:g_steal_pointer Line | Count | Source | 210 | 2.75k | { | 211 | 2.75k | gpointer *ptr = (gpointer *) pp; | 212 | 2.75k | gpointer ref; | 213 | | | 214 | 2.75k | ref = *ptr; | 215 | 2.75k | *ptr = NULL; | 216 | | | 217 | 2.75k | return ref; | 218 | 2.75k | } |
fu-elantp-struct.c:g_steal_pointer Line | Count | Source | 210 | 147 | { | 211 | 147 | gpointer *ptr = (gpointer *) pp; | 212 | 147 | gpointer ref; | 213 | | | 214 | 147 | ref = *ptr; | 215 | 147 | *ptr = NULL; | 216 | | | 217 | 147 | return ref; | 218 | 147 | } |
Unexecuted instantiation: fu-elantp-firmware.c:g_steal_pointer fu-redfish-struct.c:g_steal_pointer Line | Count | Source | 210 | 1.90k | { | 211 | 1.90k | gpointer *ptr = (gpointer *) pp; | 212 | 1.90k | gpointer ref; | 213 | | | 214 | 1.90k | ref = *ptr; | 215 | 1.90k | *ptr = NULL; | 216 | | | 217 | 1.90k | return ref; | 218 | 1.90k | } |
Unexecuted instantiation: fu-redfish-common.c:g_steal_pointer fu-redfish-smbios.c:g_steal_pointer Line | Count | Source | 210 | 57 | { | 211 | 57 | gpointer *ptr = (gpointer *) pp; | 212 | 57 | gpointer ref; | 213 | | | 214 | 57 | ref = *ptr; | 215 | 57 | *ptr = NULL; | 216 | | | 217 | 57 | return ref; | 218 | 57 | } |
Unexecuted instantiation: fu-elanfp-struct.c:g_steal_pointer fu-elanfp-firmware.c:g_steal_pointer Line | Count | Source | 210 | 106 | { | 211 | 106 | gpointer *ptr = (gpointer *) pp; | 212 | 106 | gpointer ref; | 213 | | | 214 | 106 | ref = *ptr; | 215 | 106 | *ptr = NULL; | 216 | | | 217 | 106 | return ref; | 218 | 106 | } |
fu-synaptics-prometheus-struct.c:g_steal_pointer Line | Count | Source | 210 | 4.73k | { | 211 | 4.73k | gpointer *ptr = (gpointer *) pp; | 212 | 4.73k | gpointer ref; | 213 | | | 214 | 4.73k | ref = *ptr; | 215 | 4.73k | *ptr = NULL; | 216 | | | 217 | 4.73k | return ref; | 218 | 4.73k | } |
Unexecuted instantiation: fu-synaptics-prometheus-firmware.c:g_steal_pointer fu-synaptics-mst-struct.c:g_steal_pointer Line | Count | Source | 210 | 205 | { | 211 | 205 | gpointer *ptr = (gpointer *) pp; | 212 | 205 | gpointer ref; | 213 | | | 214 | 205 | ref = *ptr; | 215 | 205 | *ptr = NULL; | 216 | | | 217 | 205 | return ref; | 218 | 205 | } |
Unexecuted instantiation: fu-synaptics-mst-firmware.c:g_steal_pointer fu-ccgx-dmc-struct.c:g_steal_pointer Line | Count | Source | 210 | 22.0k | { | 211 | 22.0k | gpointer *ptr = (gpointer *) pp; | 212 | 22.0k | gpointer ref; | 213 | | | 214 | 22.0k | ref = *ptr; | 215 | 22.0k | *ptr = NULL; | 216 | | | 217 | 22.0k | return ref; | 218 | 22.0k | } |
fu-ccgx-dmc-firmware.c:g_steal_pointer Line | Count | Source | 210 | 304k | { | 211 | 304k | gpointer *ptr = (gpointer *) pp; | 212 | 304k | gpointer ref; | 213 | | | 214 | 304k | ref = *ptr; | 215 | 304k | *ptr = NULL; | 216 | | | 217 | 304k | return ref; | 218 | 304k | } |
fu-synaptics-rmi-struct.c:g_steal_pointer Line | Count | Source | 210 | 52.4k | { | 211 | 52.4k | gpointer *ptr = (gpointer *) pp; | 212 | 52.4k | gpointer ref; | 213 | | | 214 | 52.4k | ref = *ptr; | 215 | 52.4k | *ptr = NULL; | 216 | | | 217 | 52.4k | return ref; | 218 | 52.4k | } |
Unexecuted instantiation: fu-synaptics-rmi-common.c:g_steal_pointer Unexecuted instantiation: fu-synaptics-rmi-firmware.c:g_steal_pointer fu-bcm57xx-struct.c:g_steal_pointer Line | Count | Source | 210 | 3.30k | { | 211 | 3.30k | gpointer *ptr = (gpointer *) pp; | 212 | 3.30k | gpointer ref; | 213 | | | 214 | 3.30k | ref = *ptr; | 215 | 3.30k | *ptr = NULL; | 216 | | | 217 | 3.30k | return ref; | 218 | 3.30k | } |
fu-bcm57xx-common.c:g_steal_pointer Line | Count | Source | 210 | 63 | { | 211 | 63 | gpointer *ptr = (gpointer *) pp; | 212 | 63 | gpointer ref; | 213 | | | 214 | 63 | ref = *ptr; | 215 | 63 | *ptr = NULL; | 216 | | | 217 | 63 | return ref; | 218 | 63 | } |
fu-bcm57xx-dict-image.c:g_steal_pointer Line | Count | Source | 210 | 580 | { | 211 | 580 | gpointer *ptr = (gpointer *) pp; | 212 | 580 | gpointer ref; | 213 | | | 214 | 580 | ref = *ptr; | 215 | 580 | *ptr = NULL; | 216 | | | 217 | 580 | return ref; | 218 | 580 | } |
fu-bcm57xx-firmware.c:g_steal_pointer Line | Count | Source | 210 | 2.36k | { | 211 | 2.36k | gpointer *ptr = (gpointer *) pp; | 212 | 2.36k | gpointer ref; | 213 | | | 214 | 2.36k | ref = *ptr; | 215 | 2.36k | *ptr = NULL; | 216 | | | 217 | 2.36k | return ref; | 218 | 2.36k | } |
fu-bcm57xx-stage1-image.c:g_steal_pointer Line | Count | Source | 210 | 127 | { | 211 | 127 | gpointer *ptr = (gpointer *) pp; | 212 | 127 | gpointer ref; | 213 | | | 214 | 127 | ref = *ptr; | 215 | 127 | *ptr = NULL; | 216 | | | 217 | 127 | return ref; | 218 | 127 | } |
fu-bcm57xx-stage2-image.c:g_steal_pointer Line | Count | Source | 210 | 120 | { | 211 | 120 | gpointer *ptr = (gpointer *) pp; | 212 | 120 | gpointer ref; | 213 | | | 214 | 120 | ref = *ptr; | 215 | 120 | *ptr = NULL; | 216 | | | 217 | 120 | return ref; | 218 | 120 | } |
|
219 | | |
220 | | /* type safety */ |
221 | | #if defined(glib_typeof) && GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_58 && (!defined(glib_typeof_2_68) || GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_68) |
222 | 92.3M | #define g_steal_pointer(pp) ((glib_typeof (*pp)) (g_steal_pointer) (pp)) |
223 | | #else /* __GNUC__ */ |
224 | | /* This version does not depend on gcc extensions, but gcc does not warn |
225 | | * about incompatible-pointer-types: */ |
226 | | #define g_steal_pointer(pp) \ |
227 | | (0 ? (*(pp)) : (g_steal_pointer) (pp)) |
228 | | #endif /* __GNUC__ */ |
229 | | |
230 | | /* Optimise: avoid the call to the (slower) _n function if we can |
231 | | * determine at compile-time that no overflow happens. |
232 | | */ |
233 | | #if defined (__GNUC__) && (__GNUC__ >= 2) && defined (__OPTIMIZE__) |
234 | | # define _G_NEW(struct_type, n_structs, func) \ |
235 | 42.1M | (struct_type *) (G_GNUC_EXTENSION ({ \ |
236 | 42.1M | gsize __n = (gsize) (n_structs); \ |
237 | 42.1M | gsize __s = sizeof (struct_type); \ |
238 | 42.1M | gpointer __p; \ |
239 | 42.1M | if (__s == 1) \ |
240 | 42.1M | __p = g_##func (__n); \ |
241 | 42.1M | else if (__builtin_constant_p (__n) && \ |
242 | 42.1M | (__s == 0 || __n <= G_MAXSIZE / __s)) \ |
243 | 42.1M | __p = g_##func (__n * __s); \ |
244 | 42.1M | else \ |
245 | 42.1M | __p = g_##func##_n (__n, __s); \ |
246 | 42.1M | __p; \ |
247 | 42.1M | })) |
248 | | # define _G_RENEW(struct_type, mem, n_structs, func) \ |
249 | | (struct_type *) (G_GNUC_EXTENSION ({ \ |
250 | | gsize __n = (gsize) (n_structs); \ |
251 | | gsize __s = sizeof (struct_type); \ |
252 | | gpointer __p = (gpointer) (mem); \ |
253 | | if (__s == 1) \ |
254 | | __p = g_##func (__p, __n); \ |
255 | | else if (__builtin_constant_p (__n) && \ |
256 | | (__s == 0 || __n <= G_MAXSIZE / __s)) \ |
257 | | __p = g_##func (__p, __n * __s); \ |
258 | | else \ |
259 | | __p = g_##func##_n (__p, __n, __s); \ |
260 | | __p; \ |
261 | | })) |
262 | | |
263 | | #else |
264 | | |
265 | | /* Unoptimised version: always call the _n() function. */ |
266 | | |
267 | | #define _G_NEW(struct_type, n_structs, func) \ |
268 | | ((struct_type *) g_##func##_n ((n_structs), sizeof (struct_type))) |
269 | | #define _G_RENEW(struct_type, mem, n_structs, func) \ |
270 | | ((struct_type *) g_##func##_n (mem, (n_structs), sizeof (struct_type))) |
271 | | |
272 | | #endif |
273 | | |
274 | | /** |
275 | | * g_new: |
276 | | * @struct_type: the type of the elements to allocate |
277 | | * @n_structs: the number of elements to allocate |
278 | | * |
279 | | * Allocates @n_structs elements of type @struct_type. |
280 | | * The returned pointer is cast to a pointer to the given type. |
281 | | * If @n_structs is 0 it returns %NULL. |
282 | | * Care is taken to avoid overflow when calculating the size of the allocated block. |
283 | | * |
284 | | * Since the returned pointer is already casted to the right type, |
285 | | * it is normally unnecessary to cast it explicitly, and doing |
286 | | * so might hide memory allocation errors. |
287 | | * |
288 | | * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type |
289 | | */ |
290 | 1.15k | #define g_new(struct_type, n_structs) _G_NEW (struct_type, n_structs, malloc) |
291 | | /** |
292 | | * g_new0: |
293 | | * @struct_type: the type of the elements to allocate. |
294 | | * @n_structs: the number of elements to allocate. |
295 | | * |
296 | | * Allocates @n_structs elements of type @struct_type, initialized to 0's. |
297 | | * The returned pointer is cast to a pointer to the given type. |
298 | | * If @n_structs is 0 it returns %NULL. |
299 | | * Care is taken to avoid overflow when calculating the size of the allocated block. |
300 | | * |
301 | | * Since the returned pointer is already casted to the right type, |
302 | | * it is normally unnecessary to cast it explicitly, and doing |
303 | | * so might hide memory allocation errors. |
304 | | * |
305 | | * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type. |
306 | | */ |
307 | 42.0M | #define g_new0(struct_type, n_structs) _G_NEW (struct_type, n_structs, malloc0) |
308 | | /** |
309 | | * g_renew: |
310 | | * @struct_type: the type of the elements to allocate |
311 | | * @mem: the currently allocated memory |
312 | | * @n_structs: the number of elements to allocate |
313 | | * |
314 | | * Reallocates the memory pointed to by @mem, so that it now has space for |
315 | | * @n_structs elements of type @struct_type. It returns the new address of |
316 | | * the memory, which may have been moved. |
317 | | * Care is taken to avoid overflow when calculating the size of the allocated block. |
318 | | * |
319 | | * Returns: a pointer to the new allocated memory, cast to a pointer to @struct_type |
320 | | */ |
321 | | #define g_renew(struct_type, mem, n_structs) _G_RENEW (struct_type, mem, n_structs, realloc) |
322 | | /** |
323 | | * g_try_new: |
324 | | * @struct_type: the type of the elements to allocate |
325 | | * @n_structs: the number of elements to allocate |
326 | | * |
327 | | * Attempts to allocate @n_structs elements of type @struct_type, and returns |
328 | | * %NULL on failure. Contrast with g_new(), which aborts the program on failure. |
329 | | * The returned pointer is cast to a pointer to the given type. |
330 | | * The function returns %NULL when @n_structs is 0 of if an overflow occurs. |
331 | | * |
332 | | * Since: 2.8 |
333 | | * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type |
334 | | */ |
335 | | #define g_try_new(struct_type, n_structs) _G_NEW (struct_type, n_structs, try_malloc) |
336 | | /** |
337 | | * g_try_new0: |
338 | | * @struct_type: the type of the elements to allocate |
339 | | * @n_structs: the number of elements to allocate |
340 | | * |
341 | | * Attempts to allocate @n_structs elements of type @struct_type, initialized |
342 | | * to 0's, and returns %NULL on failure. Contrast with g_new0(), which aborts |
343 | | * the program on failure. |
344 | | * The returned pointer is cast to a pointer to the given type. |
345 | | * The function returns %NULL when @n_structs is 0 or if an overflow occurs. |
346 | | * |
347 | | * Since: 2.8 |
348 | | * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type |
349 | | */ |
350 | | #define g_try_new0(struct_type, n_structs) _G_NEW (struct_type, n_structs, try_malloc0) |
351 | | /** |
352 | | * g_try_renew: |
353 | | * @struct_type: the type of the elements to allocate |
354 | | * @mem: the currently allocated memory |
355 | | * @n_structs: the number of elements to allocate |
356 | | * |
357 | | * Attempts to reallocate the memory pointed to by @mem, so that it now has |
358 | | * space for @n_structs elements of type @struct_type, and returns %NULL on |
359 | | * failure. Contrast with g_renew(), which aborts the program on failure. |
360 | | * It returns the new address of the memory, which may have been moved. |
361 | | * The function returns %NULL if an overflow occurs. |
362 | | * |
363 | | * Since: 2.8 |
364 | | * Returns: a pointer to the new allocated memory, cast to a pointer to @struct_type |
365 | | */ |
366 | | #define g_try_renew(struct_type, mem, n_structs) _G_RENEW (struct_type, mem, n_structs, try_realloc) |
367 | | |
368 | | |
369 | | /* Memory allocation virtualization for debugging purposes |
370 | | * g_mem_set_vtable() has to be the very first GLib function called |
371 | | * if being used |
372 | | */ |
373 | | struct _GMemVTable { |
374 | | gpointer (*malloc) (gsize n_bytes); |
375 | | gpointer (*realloc) (gpointer mem, |
376 | | gsize n_bytes); |
377 | | void (*free) (gpointer mem); |
378 | | /* optional; set to NULL if not used ! */ |
379 | | gpointer (*calloc) (gsize n_blocks, |
380 | | gsize n_block_bytes); |
381 | | gpointer (*try_malloc) (gsize n_bytes); |
382 | | gpointer (*try_realloc) (gpointer mem, |
383 | | gsize n_bytes); |
384 | | }; |
385 | | GLIB_DEPRECATED_IN_2_46 |
386 | | void g_mem_set_vtable (GMemVTable *vtable); |
387 | | GLIB_DEPRECATED_IN_2_46 |
388 | | gboolean g_mem_is_system_malloc (void); |
389 | | |
390 | | GLIB_VAR gboolean g_mem_gc_friendly; |
391 | | |
392 | | /* Memory profiler and checker, has to be enabled via g_mem_set_vtable() |
393 | | */ |
394 | | GLIB_VAR GMemVTable *glib_mem_profiler_table; |
395 | | GLIB_DEPRECATED_IN_2_46 |
396 | | void g_mem_profile (void); |
397 | | |
398 | | G_END_DECLS |
399 | | |
400 | | #endif /* __G_MEM_H__ */ |