mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-28 08:26:14 +01:00
Merge branch 'mcatanzaro/#2076' into 'master'
Suppress some valgrind leak warnings Closes #2076 See merge request GNOME/glib!1768
This commit is contained in:
commit
69f0f33267
@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
#include "../glib/gvalgrind.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "gatomicarray.h"
|
#include "gatomicarray.h"
|
||||||
@ -77,6 +78,11 @@ freelist_alloc (gsize size, gboolean reuse)
|
|||||||
mem = g_slice_alloc (real_size);
|
mem = g_slice_alloc (real_size);
|
||||||
mem = ((char *) mem) + sizeof (gsize);
|
mem = ((char *) mem) + sizeof (gsize);
|
||||||
G_ATOMIC_ARRAY_DATA_SIZE (mem) = size;
|
G_ATOMIC_ARRAY_DATA_SIZE (mem) = size;
|
||||||
|
|
||||||
|
#if ENABLE_VALGRIND
|
||||||
|
VALGRIND_MALLOCLIKE_BLOCK (mem, real_size - sizeof (gsize), FALSE, FALSE);
|
||||||
|
#endif
|
||||||
|
|
||||||
return mem;
|
return mem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -442,6 +442,10 @@ type_node_any_new_W (TypeNode *pnode,
|
|||||||
node = G_STRUCT_MEMBER_P (node, SIZEOF_FUNDAMENTAL_INFO);
|
node = G_STRUCT_MEMBER_P (node, SIZEOF_FUNDAMENTAL_INFO);
|
||||||
static_fundamental_type_nodes[ftype >> G_TYPE_FUNDAMENTAL_SHIFT] = node;
|
static_fundamental_type_nodes[ftype >> G_TYPE_FUNDAMENTAL_SHIFT] = node;
|
||||||
type = ftype;
|
type = ftype;
|
||||||
|
|
||||||
|
#if ENABLE_VALGRIND
|
||||||
|
VALGRIND_MALLOCLIKE_BLOCK (node, node_size - SIZEOF_FUNDAMENTAL_INFO, FALSE, TRUE);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
type = (GType) node;
|
type = (GType) node;
|
||||||
|
Loading…
Reference in New Issue
Block a user