In my opinion, the most valuable difference between GLib functions and standard libraries is that GLib functions interrupt the program if distribution is not executed. No more checking if the return value with malloc() NULL ! In addition, there is no difference in the distribution strategy - g_malloc() calls malloc() internally, although as one of the other answers say here, this can be changed.
Another difference is that the GLib functions allow you to (rudimentary) check for memory leaks using g_mem_profile() .
GLib also has a slice distributor , which is more efficient if you select many blocks of equal size. This does not use the malloc() and free() systems, but again, this can be changed for debugging purposes.
ptomato
source share