Re: g_slice_
- From: Behdad Esfahbod <behdad cs toronto edu>
- To: Dave Benson <daveb idealab com>
- Cc: gtk-devel-list gnome org, Morten Welinder <mortenw gnome org>
- Subject: Re: g_slice_
- Date: Sat, 3 Dec 2005 22:42:46 -0500 (EST)
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]