gslice: Fix inline delarations in GSlice

Accidentally introduced in commit
5cddde1fb2.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
Philip Withnall 2017-08-03 11:54:58 +01:00
parent c257757cf6
commit 9652839606

View File

@ -1273,13 +1273,18 @@ allocator_add_slab (Allocator *allocator,
ChunkLink *chunk; ChunkLink *chunk;
SlabInfo *sinfo; SlabInfo *sinfo;
gsize addr, padding, n_chunks, color = 0; gsize addr, padding, n_chunks, color = 0;
gsize page_size = allocator_aligned_page_size (allocator, SLAB_BPAGE_SIZE (allocator, chunk_size)); gsize page_size;
int errsv; int errsv;
/* allocate 1 page for the chunks and the slab */ gpointer aligned_memory;
gpointer aligned_memory = allocator_memalign (page_size, page_size - NATIVE_MALLOC_PADDING); guint8 *mem;
errsv = errno;
guint8 *mem = aligned_memory;
guint i; guint i;
page_size = allocator_aligned_page_size (allocator, SLAB_BPAGE_SIZE (allocator, chunk_size));
/* allocate 1 page for the chunks and the slab */
aligned_memory = allocator_memalign (page_size, page_size - NATIVE_MALLOC_PADDING);
errsv = errno;
mem = aligned_memory;
if (!mem) if (!mem)
{ {
const gchar *syserr = strerror (errsv); const gchar *syserr = strerror (errsv);