Marco Túlio Gontijo e Silva: Immix on GHC Summer of Code weekly report #6
My project.
This post assumes that the reader has read my last post.
I started the change in the line representation. Instead of a single linked list of free lines, it s better to work with line groups, to avoid fragmentation inside lines in allocation. I ve create a struct to represent this line group, with a pointer to the next group, and the size, in lines, of the group. It is stored in includes/rts/storage/GC.h currently, but I m not sure if this is the best place to put it, and I m thinking about changing it latter.
#include "rts/OSThreads.h"
typedef struct line_
struct line_ *next;
StgWord size;
line;
/* -----------------------------------------------------------------------------
Then we need to change the code of liberation of lines in rts/sm/Sweep.c.
else if(!(bd->flags & BF_MEDIUM))
StgBool sequence;
sequence = 0;
for(i = 1; i < BLOCK_SIZE_W / BITS_IN(W_); i++)
StgPtr start;
start = bd->start + BITS_IN(W_) * i;
if(bd->u.bitmap[i] == 0 && bd->u.bitmap[i - 1] == 0 &&
start + BITS_IN(W_) <= bd->free)
printf("DEBUG: line_found(%p)\n", start); fflush(stdout);
if(gen->first_line == NULL)
gen->first_line = (line *) start;
if(sequence)
last_line->size++;
else
if(last_line != NULL)
last_line->next = (line *) start;
last_line = (line *) start;
last_line->next = NULL;
last_line->size = 1;
sequence = 1;
else
sequence = 0;
I ve tested this code using the same technique as before, checking the produced list trasversing it after it s done. The list obtained showed the correct lines.
Now I m back to the allocation code, which never worked. The changes in rts/sm/Evac.c are straightfoward.
if (gen->first_line != NULL &&
size <= BITS_IN(W_) * gen->first_line->size)
ws->todo_free = (StgPtr) gen->first_line;
ws->todo_lim = ws->todo_free + BITS_IN(W_) * gen->first_line->size;
gen->first_line = gen->first_line->next;
to = ws->todo_free;
This cause the same kind of errors I was getting before. I should go back to debugging. My co-supervisor in my Oriented Project in Computer Science suggested me using valgrind. I ll try it.
Last week I forgot to mention I ve presented my final presentation about my Oriented Project in Computer Science. This week I finished writing my monograph.
Lockfiles are usually hard to get right, especially in sh scripts. The best bet
so far was "lockfile" included with procmail, but its semantics are pretty
weird. (Try to understand what exit code you want, with or without "-!".) Not
to mention that failing to clean up the lockfile will stop the next cron run,
etc.
Since Lenny, util-linux ships "flock". Now you simply say
We ain't dead. A long time has passed since I last wrote on this topic, and much happened unfortunately (for this effort) in other areas.
This doesn't mean that this effort is being abandoned. So here is the next big step: A
Have you already started to try out these new storage/database things commonly referred to as NoSQL? (For you google-bot, I'm talking about CouchDB, Cassandra, HBase, Hadoop, Hypertable, MongoDB, Tokyo Cabinet, etc). Well, it's one thing to install and use them but another to understand all the computer science background about them.
I hope that some of you, outside the French Cabal, are able to
understand French. I would be sorry if you missed the whole fun of
this.
The story starts at 
It doesn't look like Facebook gets its clickjacking issues under control.
The various so called "Facebook worms" keep on reappearing every couple of
days on new pages. Users don't get the concept of a "hidden like button"
causing these issues, and Facebook obviously doesn't want to shut down
the "like" functionality, since it will make them the ultimate heavyweight
on the advertising market: which other company can give you such detailed
demographics as Facebook can for your web sites?So far there seem to be two protections available:
I have been recently approached by several friends, from different countries. Mexico and the violence seems to be a frequent news topic all over the world.
I live in Mexico City, as ~25% of the country's population does. This is not an easy city, of course, and I won't deny it has tons of problems of its own. However, Mexico City (and even more so the approximately of it that is politically located in Distrito Federal, the formal country capital) is very lucky in this regard. Still, in most of the country, the violence is mostly in the news, mostly a worrying perception that is every day more insistent.
My parents live in 
The world around me seems to whirl these days. One week ago, I graduated
from
<rant>Recently I've adopted a package, mainly as Merkaartor uses it now. It made me sad to see in which bad condition the package was. Here are just a few things I had to do to bring it into shape:
A few months ago the netbase package
Like you, dear Internet readers, I have no shortage of reading material. I have ready access to more engaging, high quality, informative and relevant information than I can possibly digest. Every day, I have to choose what to read, and what to pass by. This seems like