mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-13 06:00:36 +01:00
Fixed mutex deadlock.
2001-05-18 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * gmem.c (g_mem_profile): Fixed mutex deadlock.
This commit is contained in:
parent
446b37a4d9
commit
a70206f177
@ -1,3 +1,7 @@
|
||||
2001-05-18 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||
|
||||
* gmem.c (g_mem_profile): Fixed mutex deadlock.
|
||||
|
||||
2001-05-17 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||
|
||||
* makefile.mingw.in: Add gpattern.o to objects.
|
||||
|
@ -1,3 +1,7 @@
|
||||
2001-05-18 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||
|
||||
* gmem.c (g_mem_profile): Fixed mutex deadlock.
|
||||
|
||||
2001-05-17 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||
|
||||
* makefile.mingw.in: Add gpattern.o to objects.
|
||||
|
@ -1,3 +1,7 @@
|
||||
2001-05-18 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||
|
||||
* gmem.c (g_mem_profile): Fixed mutex deadlock.
|
||||
|
||||
2001-05-17 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||
|
||||
* makefile.mingw.in: Add gpattern.o to objects.
|
||||
|
@ -1,3 +1,7 @@
|
||||
2001-05-18 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||
|
||||
* gmem.c (g_mem_profile): Fixed mutex deadlock.
|
||||
|
||||
2001-05-17 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||
|
||||
* makefile.mingw.in: Add gpattern.o to objects.
|
||||
|
@ -1,3 +1,7 @@
|
||||
2001-05-18 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||
|
||||
* gmem.c (g_mem_profile): Fixed mutex deadlock.
|
||||
|
||||
2001-05-17 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||
|
||||
* makefile.mingw.in: Add gpattern.o to objects.
|
||||
|
@ -1,3 +1,7 @@
|
||||
2001-05-18 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||
|
||||
* gmem.c (g_mem_profile): Fixed mutex deadlock.
|
||||
|
||||
2001-05-17 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||
|
||||
* makefile.mingw.in: Add gpattern.o to objects.
|
||||
|
@ -1,3 +1,7 @@
|
||||
2001-05-18 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||
|
||||
* gmem.c (g_mem_profile): Fixed mutex deadlock.
|
||||
|
||||
2001-05-17 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||
|
||||
* makefile.mingw.in: Add gpattern.o to objects.
|
||||
|
@ -1,3 +1,7 @@
|
||||
2001-05-18 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||
|
||||
* gmem.c (g_mem_profile): Fixed mutex deadlock.
|
||||
|
||||
2001-05-17 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||
|
||||
* makefile.mingw.in: Add gpattern.o to objects.
|
||||
|
22
glib/gmem.c
22
glib/gmem.c
@ -363,21 +363,30 @@ void
|
||||
g_mem_profile (void)
|
||||
{
|
||||
guint local_data[(MEM_PROFILE_TABLE_SIZE + 1) * 8 * sizeof (profile_data[0])];
|
||||
gulong local_allocs = profile_allocs;
|
||||
gulong local_zinit = profile_zinit;
|
||||
gulong local_frees = profile_frees;
|
||||
gulong local_mc_allocs = profile_mc_allocs;
|
||||
gulong local_mc_frees = profile_mc_frees;
|
||||
gulong local_allocs;
|
||||
gulong local_zinit;
|
||||
gulong local_frees;
|
||||
gulong local_mc_allocs;
|
||||
gulong local_mc_frees;
|
||||
|
||||
g_mutex_lock (g_profile_mutex);
|
||||
|
||||
local_allocs = profile_allocs;
|
||||
local_zinit = profile_zinit;
|
||||
local_frees = profile_frees;
|
||||
local_mc_allocs = profile_mc_allocs;
|
||||
local_mc_frees = profile_mc_frees;
|
||||
|
||||
if (!profile_data)
|
||||
{
|
||||
g_mutex_unlock (g_profile_mutex);
|
||||
return;
|
||||
}
|
||||
|
||||
memcpy (local_data, profile_data, (MEM_PROFILE_TABLE_SIZE + 1) * 8 * sizeof (profile_data[0]));
|
||||
memcpy (local_data, profile_data,
|
||||
(MEM_PROFILE_TABLE_SIZE + 1) * 8 * sizeof (profile_data[0]));
|
||||
|
||||
g_mutex_unlock (g_profile_mutex);
|
||||
|
||||
g_print ("GLib Memory statistics (successful operations):\n");
|
||||
profile_print_locked (local_data, TRUE);
|
||||
@ -395,7 +404,6 @@ g_mem_profile (void)
|
||||
local_mc_frees,
|
||||
((gdouble) local_mc_frees) / local_mc_allocs * 100.0,
|
||||
local_mc_allocs - local_mc_frees);
|
||||
g_mutex_unlock (g_profile_mutex);
|
||||
}
|
||||
|
||||
static gpointer
|
||||
|
22
gmem.c
22
gmem.c
@ -363,21 +363,30 @@ void
|
||||
g_mem_profile (void)
|
||||
{
|
||||
guint local_data[(MEM_PROFILE_TABLE_SIZE + 1) * 8 * sizeof (profile_data[0])];
|
||||
gulong local_allocs = profile_allocs;
|
||||
gulong local_zinit = profile_zinit;
|
||||
gulong local_frees = profile_frees;
|
||||
gulong local_mc_allocs = profile_mc_allocs;
|
||||
gulong local_mc_frees = profile_mc_frees;
|
||||
gulong local_allocs;
|
||||
gulong local_zinit;
|
||||
gulong local_frees;
|
||||
gulong local_mc_allocs;
|
||||
gulong local_mc_frees;
|
||||
|
||||
g_mutex_lock (g_profile_mutex);
|
||||
|
||||
local_allocs = profile_allocs;
|
||||
local_zinit = profile_zinit;
|
||||
local_frees = profile_frees;
|
||||
local_mc_allocs = profile_mc_allocs;
|
||||
local_mc_frees = profile_mc_frees;
|
||||
|
||||
if (!profile_data)
|
||||
{
|
||||
g_mutex_unlock (g_profile_mutex);
|
||||
return;
|
||||
}
|
||||
|
||||
memcpy (local_data, profile_data, (MEM_PROFILE_TABLE_SIZE + 1) * 8 * sizeof (profile_data[0]));
|
||||
memcpy (local_data, profile_data,
|
||||
(MEM_PROFILE_TABLE_SIZE + 1) * 8 * sizeof (profile_data[0]));
|
||||
|
||||
g_mutex_unlock (g_profile_mutex);
|
||||
|
||||
g_print ("GLib Memory statistics (successful operations):\n");
|
||||
profile_print_locked (local_data, TRUE);
|
||||
@ -395,7 +404,6 @@ g_mem_profile (void)
|
||||
local_mc_frees,
|
||||
((gdouble) local_mc_frees) / local_mc_allocs * 100.0,
|
||||
local_mc_allocs - local_mc_frees);
|
||||
g_mutex_unlock (g_profile_mutex);
|
||||
}
|
||||
|
||||
static gpointer
|
||||
|
Loading…
x
Reference in New Issue
Block a user