Use slice allocator at various places in gdbusconnection.c
use slice allocator at various places in
More than the actual patch, I'd like to take this opportunity to ask whether using slice allocator is (still) considered preferable.
We use it extensively in NetworkManager, under the assumption that it's API is more restritected and that potentially the implementation could perform better (whatever exactly that means) than (g)libc's malloc/free. Slice allocator was added a long time ago, when that probably was the case back then. I didn't see any benchmarks for years and little work seems to be done on it (if I missed it, I'd be thankful for a link). Is slice allocator still on par with libc's allocator? If not, does that mean slice allocator should no longer be used? Should we
#define it to use malloc/free instead?
Since the question depends on which libc is used, the result might be that on certain environment it's worth it, and on others not. In that case, maybe it should be redefined conditionally?