Re: Allocator in Glib



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




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