GLib is a widely-used low-level cross-platform software utility library maintained by the GNOME project.
Most Popular This Year
- gspawn: Optimize with posix_spawn codepath
Daniel Drake: When the amount of free memory on the system is somewhat low, gnome-shell will sometimes fail to launch apps, reporting the error: fork(): Cannot allocate memory
fork() is failing here because while cloning the process virtual address space, Linux worries that the thread being forked may end up COWing the entire address space of the parent process (gnome-shell, which is memory-hungry), and there is not enough free memory to permit that to happen.
In this case we are simply calling fork() in order to quickly call exec(), which will throw away the entirity of the duplicated VM, so we should look for ways to avoid the overcommit check.
The well known solution to this is to use clone(CLONE_VM) or vfork(), which completely avoids creating a new memory address space for the child.
- Add reference counted strings
Emmanuele Bassi: The last part of the reference counting saga.
- Add atomically refcounted data
Emmanuele Bassi: GArcBox is the atomic reference counting version of GRcBox.
- Meson: Remove config.h.meson template
Xavier Claessens: It became useless because glib_conf is not used anymore for generating pkgconfig files.
- Add refcounted data
Emmanuele Bassi: It is useful to provide a "reference counted allocation" API that can add reference counting semantics to any memory allocation.
- Fix the implementation of interned refstrings
Emmanuele Bassi: The global hash table we use for interned strings should not own a reference on the strings themselves, as otherwise we'd leak them all over the place.
- Increase coverage of atomic refcounted data
Emmanuele Bassi: We are not testing the API directly, and this leads to holes in the code coverage.
- Add size accessor to RcBox and ArcBox
Emmanuele Bassi: It may be useful to know how big a reference counted allocation is outside of internal checks.
- Add systemtap probes to refcounted data
Emmanuele Bassi: Probes allow us to debug refcounting bugs.
- testing: Exercise TAP output
Simon McVittie: (Tweaked by Philip Withnall to fix some minor leaks, code formatting, and add a test comment.