Go forward in time to July 2006.
A friendly toad came to visit us today.
I created a very basic patch to make evolution-data-server use GSlice instead of EMemChunk/EMemPool. Camel uses these custom allocators for its mail summaries and other things, and I was wondering if GSlice would help at least a bit in reducing the memory that the mailer needs.
Well, it doesn't help at all :( It's even larger than if we use plain malloc() instead of an exotic allocator. I'll present the details at GUADEC.
EMemChunk notes
I replaced the innards of struct EMemChunk with simply
typedef struct {
int atomsize;
GHashTable *atoms;
} EMemChunk;
Later, I just use atomsize to call g_slice_alloc (atomsize).
EMemChunk lets you make the assumption that you can do this:
EMemChunk *chunk = e_memchunk_new (...); e_memchunk_alloc (chunk, ...); e_memchunk_alloc (chunk, ...); e_memchucnk_destroy (chunk);
And this will free all the memory. So we can't simply use g_slice_alloc() inside e_memchunk_alloc(); we also have to keep track of the allocated buffers (the patch does it in a GHashTable) so that we can free all of them later. Elements are inserted like this:
void *b; b = g_slice_alloc (chunk->atomsize); g_hash_table_insert (chunk->atoms, b, b);
Later, when calling e_memchunk_destroy(), we walk the hash table and call g_slice_free1() on each element.
EMemPool notes
Like in EMemChunk, the assumption is that all the pool's blocks will be freed when the pool is freed. So we keep track of the allocated blocks in a GHashTable. Since one can allocate blocks of different sizes within the same pool, we use the (key, value) pairs in the hash table to store (pointer_to_allocated_block, blocksize), respectively.
I haven't paid attention to EMemPool's alignment flags, and simply delegate all allocation requests to g_slice_alloc(). Is the alignment really needed?
Interesting article on performance pathologies. The sections that mention cache misses are particularly nice.
Take a look at Hans Petter's goals for his Flow library.
Oralia passed her admission test for the University! She placed 17th among 494. She'll be taking a major in Pedagogy. This makes us really really happy.
Manu Cornet, the student I'm mentoring for the Summer of Code, has been kicking ass with his work:
A torture test for GTK+ theme engines. The idea is to make the theme engine paint many kinds of widgets at different sizes, and also test their performance. Also, this will have a way to test the individual "paint" methods in GtkStyleClass.
Maximum blink lifetime for blinking cursors. On the OLPC laptop, cursors should stop blinking after a certain time to reduce power consumption — the machine should be able to sit completely idle.
The government for the City of Largo, in Florida, uses GNOME. Dave Richards manages their deployment, and has been writing about his experiences with GNOME in that setting.
Ulrich has some more things to say about unshared data from libraries. We link to too many libraries even though the code doesn't use them. I forget — why was the --as-needed option for the linker problematic? Can't we just use it everywhere?
Questions for GNOME Deployments
Are you a deployment of GNOME? Are you like the City of Largo, Florida, or like the districts of Extremadura and Andalucía in Spain, who have big installations of machines running GNOME?
At the GNOME Foundation we are conducting a little, informal study of how we can make your lives easier. If you are in charge of the technical part of a GNOME deployment, we would greatly appreciate it if you could answer the following questions and mail the replies to federico@gnu.org.
I will publish a summary of the replies during GUADEC. Be sure to attend the "Dear sysadmins, what do you need?" session on Friday, June 30!
(If you are not the head of a deployment, but know someone who is, please point that person to this set of questions. Thank you!)
Do you live in the USA? Preferably close to Boston, MA? The GNOME Foundation is looking for a part-time administrator to handle the day-to-day paperwork.
A few months ago Oralia and I were rolling on the floor when the news said that a cold wave had made the temperature in the port of Veracruz go to 17°C, down from the usual 30-something degrees, and so the city government had brought out shelters for the homeless.
Yesterday it was 21°C here and *we* were freezing our asses. So evidently living here has spoiled us.
Today in the afternoon I had my appointment to get my upper wisdom teeth extracted. I first got anesthetized with a painless injection. I've gotten so many similar shots before that I'm used to them. Then the dentist took a spatula-like tool and began to separate the gums from the teeth. Then she drew out the Terry Gilliam-esque tools: forceps of various sizes specially designed to grip molars. They look like curved, pointed pliers. The idea is that the curved tip catches on to the fat part of the molar, just where the root starts, and then the dentist just has to wiggle the tool in all directions and pull like a motherfucker until the tooth becomes loose. Nice and reliable brute-force, nothing sophisticated.
Both of my wisdom teeth were cracked diagonally, and they were missing about half of the bottom part each — like a piece of bread cut diagonally, and a half is missing. So, the forceps had a good hold on one side of each tooth (the crust of the bread), but practically none on the other side (since there's a diagonal and no crust). It took several tries with forceps of various sizes for each tooth to loosen up. Each time the tool slips on the cracked side, you hear a huge snap and you feel like they are breaking your skull.
Of course, sometimes another little bit of the tooth breaks off by itself. One such bit flew away from my mouth and landed on my shirt. Immediately there was this absolutely fetid smell: that bit of tooth was a chunk of the infected, rotten part of the tooth.
With all the wiggling and pushing and pulling, the porcelain crowns that I had on the adjacent teeth got loose and eventually the dentist removed them to re-set them later. Those are the crowns that I got a couple years ago to cover a couple of root canals. In both of them, the cement to affix the crown to the tooth had become porous, instead of being completely solid, so it had started absorbing saliva, blood, and bits of food. It all rots within the porous cement, and it smells really bad. I was carrying two little pockets of bad breath in there.
I got to keep the extracted molars. They are bloody and dirty right now. Per the dentist's advice, I put them in some chlorine bleach solution. They should be completely white within a few days.
But you were here for the gore, weren't you?
By the way, those small 80ml pyrex beakers are perfect to hold a shot of espresso while you are foaming milk for a capuccino. The shape of the beak makes it so that not a drop spills over the side when you finally pour the espresso.
Go backward in time to May 2006.
Federico Mena-Quintero <federico@gnome.org> Fri 2006/Jun/02 22:23:21 CDT