On Sun, 3 Jan 2010 13:25:35 +0100
Enrico Weigelt <weig...@metux.de> wrote:

> Hi folks,
> 
> 
> I'm working on using garbage collection (boehm-gc) instead of
> explicit free()'s.
> 
> Perhaps you like to have a look at it.

free in sense of libc's free(3)? It's call count is close to zero.
Is mc a memory allocation intensive beast? glib allows to insert own plugs
for malloc/free:

glib/gmem.h:
void g_mem_set_vtable (GMemVTable * vtable);

struct _GMemVTable                                                              
                                               
{
  gpointer (*malloc)      (gsize    n_bytes);
  gpointer (*realloc)     (gpointer mem, gsize n_bytes);
  void     (*free)        (gpointer mem);  /* optional; set to NULL if not used 
! */
  gpointer (*calloc)      (gsize    n_blocks, gsize    n_block_bytes);
  gpointer (*try_malloc)  (gsize    n_bytes);
  gpointer (*try_realloc) (gpointer mem, gsize    n_bytes);
};

What heap object's lifetime  bothers you? There is also g_mem_chunk_* for
fixed sized objects suitable for dentries.

Would be nice to see the problem for solution.


-- 

  Sergei

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel

Reply via email to