Skip to content

Use the system allocator on UNIX when creating GTypeInstances

Emmanuele Bassi requested to merge ebassi/object-allocator into main

Instead of replacing the slice allocator wholesale, we can start phasing it out by having GTypeInstance use the system allocator on operating systems where we know we have access to a decent allocator.

This is mostly a way to address #1079 (closed) without committing to fully gutting GSlice in the cases where we might still need it. The main user of GSlice is still GTypeInstance/GObject, and on UNIX-like systems we know we have a decent system allocator. It's also going to be easier to move to the system allocator on other platforms in the future, if needs be.

Helps: #1079 (closed)

Edited by Philip Withnall

Merge request reports