Category Archives: GLib

23.06.2008 Writing Unit Tests with GLib

Every other week, someone asks how to use the new unit testing framework in GLib (released with GLib-2.16.0) and Gtk+ (to be released with the next stable). First, here is a write-up from last December that summarizes all important aspects: Test Framework Mini Tutorial.

For people building packages that use the new […]

16.05.2008 Becoming a Gtk+ maintainer

Amongst many other things during the Gtk+ Hackfest 2008, it was brought to my attention that Gtk+ maintainership is sometimes perceived as some kind of leet circle, hard to join for newcomers. I can’t really imagine how “hard” it is for newcomers to join Gtk+ maintenance these days. The learning curve probably […]

07.04.2008 On Moving Gtk+ to Git

There have been several requests about hosting Gtk+ (and GLib) as a Git repository recently and since that topic has come up more and more often, I meant to write about this for quite some time.

Let’s first take a look at the actual motivation for such a move. There are […]

05.02.2008 Thread-safe class initializers

I finally got around to fix a long-standing and tricky bug report: Bug 64764 - Class initialization isn’t thread safe. Thread safety problems in class initializers and _get_type() functions caused nasty problems in other components that depend on parallel type creation, in particular GStreamer (Dependency Graph for bug 64764). With both being fixed […]

17.08.2007 What are ELF libraries good for anyway?

Or: Who in the world is actually linking against GLib without Gtk+?
I’m currently in the process of building some general purpose infrastructure for Rapicorn and because a good portion of the C++ utilities used in Beast and Rapicorn are factored out into an extra library called Birnet. I’m running into similar complexity […]

28.12.2006 G_SLICE=debug-blocks

One of the typical problems with implementing an allocator is that all sorts of memory failures in programs get attributed to the allocator. That’s because messing up heap memory somewhere in a program or library usually messes up the allocator state even if it is implemented correctly. For several months now, we have been […]

25.01.2006 Allocation debugging with GLib

I just completed reworking the GSlice and g_malloc() memory debugging hooks. With this, GLib-2.10 (or the next GLib-2.9 development version due this weekend) will (without recompilation) support G_SLICE=always-malloc and G_DEBUG=gc-friendly. These cause all GSlice allocations to go through g_malloc() and g_free() instead and cause all released memory to be memset() to 0. This helps […]

20.12.2005 Tuning GSlice memory consumption

The other day, Tommi Komulainen pointed out to me that GSlice is using more memory than memchunks for him after bootup of the N770. Now, GSlice is supposed to be faster than memchunks, yes. And its supposed to scale far better across multiple threads. In the long run it is also meant to be […]

02.12.2005 Landing g_slice_new()

I finally managed to finish up the new g_slice_*() allocator for GLib CVS and commit it. For most platforms, it should be a lot faster than malloc(), and on my machine it saves 20-30% in performance over allocating with mem-chunks. But most importantly, it does share equally sized chunks across a program, which mem-chunks […]

01.08.2005

Today, i started working at imendio, we’re doing some pretty interesting hacking here, so i hope the job is going to be fun.
And, the hopefully last incarnation of the atomic ref-counting patch for GObject i blogged about earlier finally made it into CVS. With atomic ref-counting, GObject users still have to make […]

Bad Behavior has blocked 167 access attempts in the last 7 days.