Re: glib memory allocation problems
- From: Brandon Casey <casey nrlssc navy mil>
- To: Dimitrios Apostolou <jimis gmx net>
- Cc: timj gtk org, gtk-devel-list gnome org, Miklos Szeredi <miklos szeredi hu>
- Subject: Re: glib memory allocation problems
- Date: Tue, 15 May 2007 11:39:44 -0500
Dimitrios Apostolou wrote:
I don't understand some things however, so here are some questions to glib devs:
1) Why the crash didn't occur when using G_SLICE=always-malloc?
IANA glib dev.
I believe when G_SLICE=always-malloc, the g_slice allocators are
simplified to something like:
g_slice_alloc(block_size) becomes malloc(block_size)
g_slice_free(type, mem) becomes free(mem)
and when -lpthread is used, thread-safe versions of malloc/free are
linked in by the compiler. So, no crash since the memory allocators were
thread safe.
-brandon
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]