Re: Allocator in Glib



On Sat, 3 Feb 2001, Dave Benson wrote:

> 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...

i have some substantial changes for the GAllocator code and memchunks
used inside of glib in mind. they're probably post-2.0 material, but
i think a warning is appropriate to not use GAllocator for things other
than the current API that takes a GAllocator as argument.
dave, as long as your skip-list is used only on linux, glibc will do
pretty fine with pure malloc/free, if you're still worried, simply
cook up your own memchunk.
GAllocator is there for more sophisticated corner-cases which i've never
been sure are worth worrying about, forget about it ;)

> 
> - dave
> 

---
ciaoTJ





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