diff options
author | Philip Withnall <pwithnall@endlessos.org> | 2023-01-25 14:12:20 +0000 |
---|---|---|
committer | Philip Withnall <pwithnall@endlessos.org> | 2023-02-02 12:30:59 +0000 |
commit | 329843f682d1216d4f41aab7b5711f21ef280b71 (patch) | |
tree | ca1032c6eba41b568fba4e4f629c11c6dd4528be /docs | |
parent | 0f7797d76d81e3858317f7cb2bca0ed540a81d46 (diff) | |
download | glib-329843f682d1216d4f41aab7b5711f21ef280b71.tar.gz |
gmem: Add g_free_sized() and g_aligned_free_sized()
These wrap `free_sized()` and `free_aligned_sized()`, which are present
in C23[1]. This means that user code can start to use them without checking
for C23 support everywhere first.
It also means we can use them internally in GSlice to get a bit of
performance for the code which still uses it.
See https://en.cppreference.com/w/c/memory/free_aligned_sized and
https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2699.htm.
[1]: Specifically, section 7.24.3.4 of the latest C23 draft at
https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3088.pdf.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/reference/glib/glib-sections.txt.in | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/docs/reference/glib/glib-sections.txt.in b/docs/reference/glib/glib-sections.txt.in index 072084b2e..04f5aa4eb 100644 --- a/docs/reference/glib/glib-sections.txt.in +++ b/docs/reference/glib/glib-sections.txt.in @@ -1082,6 +1082,7 @@ g_try_realloc_n <SUBSECTION> g_free +g_free_sized g_clear_pointer g_steal_pointer g_mem_gc_friendly @@ -1096,6 +1097,7 @@ g_newa0 g_aligned_alloc g_aligned_alloc0 g_aligned_free +g_aligned_free_sized <SUBSECTION> g_memmove |