mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-12 23:46:17 +01:00
tests: Remove unused function from slice-memchunk.c
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
parent
8d613ee7ff
commit
6a1e35422f
@ -29,7 +29,6 @@ static const guint prime_size = 1021; /* 769; 509 */
|
|||||||
static const gboolean clean_memchunks = FALSE;
|
static const gboolean clean_memchunks = FALSE;
|
||||||
static const guint number_of_blocks = 10000; /* total number of blocks allocated */
|
static const guint number_of_blocks = 10000; /* total number of blocks allocated */
|
||||||
static const guint number_of_repetitions = 10000; /* number of alloc+free repetitions */
|
static const guint number_of_repetitions = 10000; /* number of alloc+free repetitions */
|
||||||
static const gboolean want_corruption = FALSE;
|
|
||||||
|
|
||||||
/* --- old memchunk prototypes (memchunks.c) --- */
|
/* --- old memchunk prototypes (memchunks.c) --- */
|
||||||
GMemChunk* old_mem_chunk_new (const gchar *name,
|
GMemChunk* old_mem_chunk_new (const gchar *name,
|
||||||
@ -51,18 +50,6 @@ void old_mem_chunk_info (void);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* --- functions --- */
|
/* --- functions --- */
|
||||||
static inline int
|
|
||||||
corruption (void)
|
|
||||||
{
|
|
||||||
if (G_UNLIKELY (want_corruption))
|
|
||||||
{
|
|
||||||
/* corruption per call likelyness is about 1:4000000 */
|
|
||||||
guint32 r = g_random_int() % 8000009;
|
|
||||||
return r == 277 ? +1 : r == 281 ? -1 : 0;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline gpointer
|
static inline gpointer
|
||||||
memchunk_alloc (GMemChunk **memchunkp,
|
memchunk_alloc (GMemChunk **memchunkp,
|
||||||
guint size)
|
guint size)
|
||||||
|
Loading…
Reference in New Issue
Block a user