Re: Memory Issues with gtk, gnome panel, etc



Hi,

Robert Soros <bobsoros@yahoo.com> writes:

> 	Why is this happening, is it gtk ? is it some gnome app in
> particular, like the panel, applets, etc?

Could this be glib?

I just looked into glib to teach myself something about
ListAllocators. But all ListAllocators are initialized with 

   current_allocator->list_mem_chunk = g_mem_chunk_new ("list mem chunk",
							 sizeof (GList),
							 1024,
							 G_ALLOC_ONLY);

G_ALLOC_ONLY would mean, that the Allocator is only capable of
allocating the memory and not freeing it anymore. Here is the
appropriate section from gmem.c:

void
g_mem_chunk_free (GMemChunk *mem_chunk,
		  gpointer   mem)
{
...
  /* Don't do anything if this is an ALLOC_ONLY chunk
   */
  if (rmem_chunk->type == G_ALLOC_AND_FREE)
...
}

This results in the fact, that freed list elements are not appended to 
the free_atoms list and cannot be reused. for further allocations.

Did I get something totaly wrong, or why is this the default
behavoir?

Dirk



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]