mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
leakstracer: Get rid of GSlice usage
It's not faster than malloc, and is slower in most cases. Glib is also getting rid of it entirely: https://gitlab.gnome.org/GNOME/glib/merge_requests/940
This commit is contained in:
parent
a1c44cca3a
commit
3e2f24955e
1 changed files with 4 additions and 4 deletions
|
@ -271,7 +271,7 @@ typedef struct
|
|||
static ObjectLog *
|
||||
object_log_new (gpointer obj)
|
||||
{
|
||||
ObjectLog *o = g_slice_new (ObjectLog);
|
||||
ObjectLog *o = g_new (ObjectLog, 1);
|
||||
|
||||
o->object = obj;
|
||||
|
||||
|
@ -286,7 +286,7 @@ object_log_new (gpointer obj)
|
|||
static void
|
||||
object_log_free (ObjectLog * obj)
|
||||
{
|
||||
g_slice_free (ObjectLog, obj);
|
||||
g_free (obj);
|
||||
}
|
||||
#endif /* G_OS_UNIX */
|
||||
|
||||
|
@ -496,7 +496,7 @@ typedef struct
|
|||
static Leak *
|
||||
leak_new (gpointer obj, GType type, guint ref_count, ObjectRefingInfos * infos)
|
||||
{
|
||||
Leak *leak = g_slice_new (Leak);
|
||||
Leak *leak = g_new (Leak, 1);
|
||||
|
||||
leak->obj = obj;
|
||||
leak->type_name = g_type_name (type);
|
||||
|
@ -511,7 +511,7 @@ static void
|
|||
leak_free (Leak * leak)
|
||||
{
|
||||
g_free (leak->desc);
|
||||
g_slice_free (Leak, leak);
|
||||
g_free (leak);
|
||||
}
|
||||
|
||||
static gint
|
||||
|
|
Loading…
Reference in a new issue