slice-test: Use new g_newa0() function

Replace old `g_alloca()` and `memset()` with `g_newa0()`
This commit is contained in:
Nishal Kulkarni 2021-11-25 13:42:39 +05:30 committed by Philip Withnall
parent b4631c44ad
commit 1c7936b368

View File

@ -95,8 +95,7 @@ test_memchunk_thread (gpointer data)
}
/* prepare for memchunk creation */
memchunks = g_alloca (sizeof (memchunks[0]) * prime_size);
memset (memchunks, 0, sizeof (memchunks[0]) * prime_size);
memchunks = g_newa0 (GMemChunk*, prime_size);
ps = g_new (guint8*, number_of_blocks);
ss = g_new (guint, number_of_blocks);