mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-03 14:42:10 +01:00
When DISABLE_MEM_POOLS is set, loop through and free the poll records
Mon Aug 25 12:17:20 2003 Owen Taylor <otaylor@redhat.com> * glib/gmain.c (g_main_context_unref_and_unlock): When DISABLE_MEM_POOLS is set, loop through and free the poll records explicitely, since g_mem_chunk_destroy() won't do it. (#118121, Morten Welinder)
This commit is contained in:
parent
610240c411
commit
2afc40f3a6
@ -1,3 +1,10 @@
|
|||||||
|
Mon Aug 25 12:17:20 2003 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib/gmain.c (g_main_context_unref_and_unlock):
|
||||||
|
When DISABLE_MEM_POOLS is set, loop through and free
|
||||||
|
the poll records explicitely, since g_mem_chunk_destroy()
|
||||||
|
won't do it. (#118121, Morten Welinder)
|
||||||
|
|
||||||
2003-08-22 Samúel Jón Gunnarsson <sammi@techattack.nu>
|
2003-08-22 Samúel Jón Gunnarsson <sammi@techattack.nu>
|
||||||
|
|
||||||
* is.po: Added "is" to ALL_LINGUAS.
|
* is.po: Added "is" to ALL_LINGUAS.
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
Mon Aug 25 12:17:20 2003 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib/gmain.c (g_main_context_unref_and_unlock):
|
||||||
|
When DISABLE_MEM_POOLS is set, loop through and free
|
||||||
|
the poll records explicitely, since g_mem_chunk_destroy()
|
||||||
|
won't do it. (#118121, Morten Welinder)
|
||||||
|
|
||||||
2003-08-22 Samúel Jón Gunnarsson <sammi@techattack.nu>
|
2003-08-22 Samúel Jón Gunnarsson <sammi@techattack.nu>
|
||||||
|
|
||||||
* is.po: Added "is" to ALL_LINGUAS.
|
* is.po: Added "is" to ALL_LINGUAS.
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
Mon Aug 25 12:17:20 2003 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib/gmain.c (g_main_context_unref_and_unlock):
|
||||||
|
When DISABLE_MEM_POOLS is set, loop through and free
|
||||||
|
the poll records explicitely, since g_mem_chunk_destroy()
|
||||||
|
won't do it. (#118121, Morten Welinder)
|
||||||
|
|
||||||
2003-08-22 Samúel Jón Gunnarsson <sammi@techattack.nu>
|
2003-08-22 Samúel Jón Gunnarsson <sammi@techattack.nu>
|
||||||
|
|
||||||
* is.po: Added "is" to ALL_LINGUAS.
|
* is.po: Added "is" to ALL_LINGUAS.
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
Mon Aug 25 12:17:20 2003 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib/gmain.c (g_main_context_unref_and_unlock):
|
||||||
|
When DISABLE_MEM_POOLS is set, loop through and free
|
||||||
|
the poll records explicitely, since g_mem_chunk_destroy()
|
||||||
|
won't do it. (#118121, Morten Welinder)
|
||||||
|
|
||||||
2003-08-22 Samúel Jón Gunnarsson <sammi@techattack.nu>
|
2003-08-22 Samúel Jón Gunnarsson <sammi@techattack.nu>
|
||||||
|
|
||||||
* is.po: Added "is" to ALL_LINGUAS.
|
* is.po: Added "is" to ALL_LINGUAS.
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
Mon Aug 25 12:17:20 2003 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib/gmain.c (g_main_context_unref_and_unlock):
|
||||||
|
When DISABLE_MEM_POOLS is set, loop through and free
|
||||||
|
the poll records explicitely, since g_mem_chunk_destroy()
|
||||||
|
won't do it. (#118121, Morten Welinder)
|
||||||
|
|
||||||
2003-08-22 Samúel Jón Gunnarsson <sammi@techattack.nu>
|
2003-08-22 Samúel Jón Gunnarsson <sammi@techattack.nu>
|
||||||
|
|
||||||
* is.po: Added "is" to ALL_LINGUAS.
|
* is.po: Added "is" to ALL_LINGUAS.
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
Mon Aug 25 12:17:20 2003 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib/gmain.c (g_main_context_unref_and_unlock):
|
||||||
|
When DISABLE_MEM_POOLS is set, loop through and free
|
||||||
|
the poll records explicitely, since g_mem_chunk_destroy()
|
||||||
|
won't do it. (#118121, Morten Welinder)
|
||||||
|
|
||||||
2003-08-22 Samúel Jón Gunnarsson <sammi@techattack.nu>
|
2003-08-22 Samúel Jón Gunnarsson <sammi@techattack.nu>
|
||||||
|
|
||||||
* is.po: Added "is" to ALL_LINGUAS.
|
* is.po: Added "is" to ALL_LINGUAS.
|
||||||
|
27
glib/gmain.c
27
glib/gmain.c
@ -553,6 +553,26 @@ g_main_context_ref (GMainContext *context)
|
|||||||
UNLOCK_CONTEXT (context);
|
UNLOCK_CONTEXT (context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* If DISABLE_MEM_POOLS is defined, then freeing the
|
||||||
|
* mem chunk won't free the records, so we have to
|
||||||
|
* do it manually. The conditionalization here is
|
||||||
|
* an optimization; g_mem_chunk_free() is a no-op
|
||||||
|
* when DISABLE_MEM_POOLS is set.
|
||||||
|
*/
|
||||||
|
#ifdef DISABLE_MEM_POOLS
|
||||||
|
static void
|
||||||
|
poll_rec_list_free (GMainContext *context,
|
||||||
|
GPollRec *list)
|
||||||
|
{
|
||||||
|
while (list)
|
||||||
|
{
|
||||||
|
GPollRec *tmp_rec = list;
|
||||||
|
list = list->next;
|
||||||
|
g_chunk_free (tmp_rec, context->poll_chunk);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif /* DISABLE_MEM_POOLS */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
g_main_context_unref_and_unlock (GMainContext *context)
|
g_main_context_unref_and_unlock (GMainContext *context)
|
||||||
{
|
{
|
||||||
@ -581,7 +601,12 @@ g_main_context_unref_and_unlock (GMainContext *context)
|
|||||||
|
|
||||||
g_ptr_array_free (context->pending_dispatches, TRUE);
|
g_ptr_array_free (context->pending_dispatches, TRUE);
|
||||||
g_free (context->cached_poll_array);
|
g_free (context->cached_poll_array);
|
||||||
|
|
||||||
|
#ifdef DISABLE_MEM_POLLS
|
||||||
|
poll_rec_list_free (context, context->poll_records);
|
||||||
|
poll_rec_list_free (context, context->poll_free_list);
|
||||||
|
#endif /* DISABLE_MEM_POOLS */
|
||||||
|
|
||||||
if (context->poll_chunk)
|
if (context->poll_chunk)
|
||||||
g_mem_chunk_destroy (context->poll_chunk);
|
g_mem_chunk_destroy (context->poll_chunk);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user