Re: g_slice_



On Sat, 3 Dec 2005, Dave Benson wrote:

> i have two sort-of related questions:
>   - doesn't this belong in glibc?
>   - why isn't it implemented as g_mem_set_table(g_slice_allocator)?

No, the difference is that for no-overhead allocation to be
possible, g_slice implementation is using the fact that the size
of the struct is available at free()ing time.  That's just not
the way malloc/free API works.

> - dave

--behdad
http://behdad.org/

"Commandment Three says Do Not Kill, Amendment Two says Blood Will Spill"
	-- Dan Bern, "New American Language"



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