title: using tcmalloc with glib
body: <p>I want to test the performance improvement that I could get by using Google's tcmalloc. My program is built using quite a lot of the utilities provided by glib (hashes, lists, arrays, ...). So what I want is basically to make glib to use tcmalloc instead of glibc's malloc.</p>
  
  <p>I could address this issue with two approaches:</p>
  
  <ol>
  <li>By compiling glib with the <code>-tcmalloc</code> option.</li>
  <li>by using <code>g_mem_set_vtable ()</code> from the <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-mem-set-vtable" rel="nofollow">glib's memory allocation functions</a>.</li>
  </ol>
  
  <p>I actually prefer the second one but I have not found any examples for implementing it.</p>
  
  <p>Any hints ? Any ideas for doing this ?</p>