I was compiling my gsoc code submission the other day. It was done as a git repo (available here), mostly collections of patches, but I also had some gists lying around. Their individual revisions were probably not that interesting, but just adding them as history-less blobs would was also undesirable ...
While scanning xprepare.c:xdl_prepare_ctx()
[1] in the hopes of speed-ups, I stumbled over this gem.
What puzzled me was this expression in xdl_cha_alloc()
:
chanode_t *ancur;
ancur = (chanode_t *) xdl_malloc(sizeof(chanode_t) + cha->nsize);
Huh? Passing sizeof(chanode_t)
made sense, but adding cha->nsize
?Where does nsize
come from? Turning to ...
People like to whine about how much NUS SOC sucks. Probably due to the bad experience with vi[m] on Sunfire. But let me be the first to tell you - no. They rule. Absolutely.
Ok ok, I'll come clean - I'm sounding like a fanboi after all the love ...
The conversion is complete. A few changes were made in the implementation, for example, some changes were due to the way line ranges were being handled. I also missed out on differences in the ranges for types, as I developed on a 64-bit machine (Java's types are 64-bit). This ...