lunatechian (lunatech-ian)

one relating to, belonging to, or resembling lunatech

debugging malloc

Have you read the man malloc page recently? Did you notice this section there

Recent versions of Linux libc (later than 5.4.23) and GNU libc (2.x) include a malloc implementation which is tunable via environment variables. When MALLOC_CHECK_ is set, a special (less efficient) implementation is used which is designed to be tolerant against simple errors, such as double calls of free() with the same argument, or overruns of a single byte (off-by-one bugs). Not all such errors can be protected against, however, and memory leaks can result. If MALLOC_CHECK_ is set to 0, any detected heap corruption is silently ignored; if set to 1, a diagnostic is printed on stderr; if set to 2, abort() is called immediately. This can be useful because otherwise a crash may happen much later, and the true cause for the problem is then very hard to track down.

So, you can do export MALLOC_CHECK_=1 and malloc will print debugging messages to the stderr.

Defined tags for this entry: ,

emacs tip

If you want to check what compile options were used to build the emacs, check the value of the variable system-configuration-options in emacs. i.e. C-h-v system-configuration-options

In my case, it is `—with-x-toolkit=gtk' '—with-xft=yes' '—prefix=/home/rshekhar/fakeroot/'`

Defined tags for this entry:

good joomla template

Check out SpaceGlow joomla template by Bernard Esterhuyse. It is nice, however, more importantly, it is GPL-ed. I have been checking put a lot of joomla templates for my site, but all the joomla templates that I came across shared an important defect. Even though the template authors mentioned that the template was GPL-ed, they usually had a link to their own sites in the template, along with the request (or order), not to remove that line.

The Spaceglow template is really GPL-ed. This will allow me to hack it up further.

Defined tags for this entry: ,