gtk2/gsk/gskallocprivate.h
Руслан Ижбулатов 8e74eb382f Add aligned allocator functions to GSK
The code is mostly stolen from graphene.
Allocators support any alignment, but their implementation
only calls system aligned allocator functions if malloc()
is not aligned to 16-byte boundaries. If it is aligned,
the implementation just calls malloc() regardless of which
alignment is requested by the caller.

This can be fixed by saving the result of meson malloc()
alignment check and adding a few conditions to the implementation,
but right now GSK and GTK only need 16-byte alignment either way.
2018-06-09 14:01:03 +00:00

19 lines
474 B
C

#ifndef __GSK_ALLOC_PRIVATE_H__
#define __GSK_ALLOC_PRIVATE_H__
#include <glib.h>
G_BEGIN_DECLS
gpointer gsk_aligned_alloc (gsize size,
gsize number,
gsize alignment);
gpointer gsk_aligned_alloc0 (gsize size,
gsize number,
gsize alignment);
void gsk_aligned_free (gpointer mem);
G_END_DECLS
#endif /* __GSK_ALLOC_PRIVATE_H__ */