mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 15:36:14 +01:00
45b5a6c1e5
Keep the API for ABI compatibility. See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2935#note_1650099 for a summary of the reasoning for this change: - The performance of system-provided allocators has improved since GSlice was written, and they are now similarly as performant, or more performant, than GSlice. - The code is unmaintained and nobody understands it. - It doesn’t integrate with tooling and system security features which have been written for the system `malloc()` implementation (such as sanitisers, valgrind, etc.). - It’s confusing for developers: should they use `g_slice_new()` or `g_new()`? - GSlice is faster than the libc allocator for allocating and (particularly) freeing linked lists, but since these are a rubbish data structure, that’s not a great thing to optimise for. For the cases where application performance is negatively impacted by the implementation of GSlice being dropped (and we don’t think there’ll be many), applications can use a drop-in `malloc()` replacement which is more suited to their particular workload. Choosing an allocator in GLib to suit all application workloads is not possible. Including documentation updates and cleanups by Philip Withnall. Fixes: #1079 |
||
---|---|---|
.. | ||
reference | ||
backports.md | ||
CODEOWNERS | ||
debugging.txt | ||
macros.txt | ||
meson-version.md | ||
rationales.md | ||
releasing.md | ||
roadmap.md | ||
supported-platforms.md | ||
testing.md | ||
toolchain-requirements.md |