Re: Allocator in Glib



I for one would sort-of like to see
a nicer allocators -- but i admit they are
hard to design.  Cutting and pastign a c structure
from gmem.c seems pretty gross.
Of course, i'd even more like to see a thread-safe
design (i suppose using thread-private allocator stacks)
that should bloat the code that needs cutting-and-pasting to
over 100 lines...

- dave


On Sat, Feb 03, 2001 at 11:10:16AM -0500, jrb redhat com wrote:
> Derek Simkowiak <dereks realloc net> writes:
> 
> >      Hello,
> > 	I need a general-purpose Allocator.  That is, one that handles
> > things other than GList, GSList, and GNode, and has its own pool(s) that
> > it draws from.
> > 
> > 	Should I write my own from scratch, or work on extending the
> > GAllocator API?  If I did alter the GAllocator API, would the
> > modifications be something the GTK+ team would consider?
> 
> What does GAllocator not do that you need?  GAllocator will already
> allocate arbitrary sized chunks for you.  Try cutting and pasting the
> code from GList, and modify it slightly so it allocates your struct
> instead of a GList.
> 
> Thanks,
> -Jonathan
> 
> _______________________________________________
> gtk-devel-list mailing list
> gtk-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-devel-list

-- 




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